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()
|
||||
{
|
||||
if (is_resource($this->result)) {
|
||||
if ($this->result instanceof mysqli_result) {
|
||||
@mysqli_free_result($this->result);
|
||||
}
|
||||
$this->fields = array();
|
||||
|
||||
@@ -308,6 +308,7 @@ function executeQuery ($SqlStatement, $DBConnectionUID = 'workflow', $aParameter
|
||||
while ($rs->next()) {
|
||||
$result[$i ++] = $rs->getRow();
|
||||
}
|
||||
$rs->close();
|
||||
$con->commit();
|
||||
break;
|
||||
case preg_match( "/^INSERT\s/i", $statement ):
|
||||
|
||||
Reference in New Issue
Block a user