PMC-1042 Memory Leak using PM Function "executeQuery"
This commit is contained in:
@@ -98,7 +98,7 @@ class MySQLiResultSet extends ResultSetCommon implements ResultSet {
|
|||||||
*/
|
*/
|
||||||
public function close()
|
public function close()
|
||||||
{
|
{
|
||||||
if (is_resource($this->result)) {
|
if ($this->result instanceof mysqli_result) {
|
||||||
@mysqli_free_result($this->result);
|
@mysqli_free_result($this->result);
|
||||||
}
|
}
|
||||||
$this->fields = array();
|
$this->fields = array();
|
||||||
|
|||||||
@@ -308,6 +308,7 @@ function executeQuery ($SqlStatement, $DBConnectionUID = 'workflow', $aParameter
|
|||||||
while ($rs->next()) {
|
while ($rs->next()) {
|
||||||
$result[$i ++] = $rs->getRow();
|
$result[$i ++] = $rs->getRow();
|
||||||
}
|
}
|
||||||
|
$rs->close();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
break;
|
break;
|
||||||
case preg_match( "/^INSERT\s/i", $statement ):
|
case preg_match( "/^INSERT\s/i", $statement ):
|
||||||
|
|||||||
Reference in New Issue
Block a user