mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00
More leak fixes.
This commit is contained in:
parent
2917ff1e7d
commit
d782abf416
2 changed files with 6 additions and 4 deletions
|
@ -659,16 +659,16 @@ static void pdo_dbh_free_storage(zend_object *object TSRMLS_DC)
|
||||||
dbh->methods->closer(dbh TSRMLS_CC);
|
dbh->methods->closer(dbh TSRMLS_CC);
|
||||||
|
|
||||||
if (dbh->data_source) {
|
if (dbh->data_source) {
|
||||||
efree((char *)dbh->data_source);
|
pefree((char *)dbh->data_source, dbh->is_persistent);
|
||||||
}
|
}
|
||||||
if (dbh->username) {
|
if (dbh->username) {
|
||||||
efree(dbh->username);
|
pefree(dbh->username, dbh->is_persistent);
|
||||||
}
|
}
|
||||||
if (dbh->password) {
|
if (dbh->password) {
|
||||||
efree(dbh->password);
|
pefree(dbh->password, dbh->is_persistent);
|
||||||
}
|
}
|
||||||
|
|
||||||
efree(dbh);
|
pefree(dbh, dbh->is_persistent);
|
||||||
}
|
}
|
||||||
|
|
||||||
zend_object_value pdo_dbh_new(zend_class_entry *ce TSRMLS_DC)
|
zend_object_value pdo_dbh_new(zend_class_entry *ce TSRMLS_DC)
|
||||||
|
|
|
@ -526,6 +526,7 @@ static PHP_METHOD(PDOStatement, fetchAll)
|
||||||
PDO_STMT_CLEAR_ERR();
|
PDO_STMT_CLEAR_ERR();
|
||||||
MAKE_STD_ZVAL(data);
|
MAKE_STD_ZVAL(data);
|
||||||
if (!do_fetch(stmt, TRUE, data, how TSRMLS_CC)) {
|
if (!do_fetch(stmt, TRUE, data, how TSRMLS_CC)) {
|
||||||
|
FREE_ZVAL(data);
|
||||||
PDO_HANDLE_STMT_ERR();
|
PDO_HANDLE_STMT_ERR();
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -535,6 +536,7 @@ static PHP_METHOD(PDOStatement, fetchAll)
|
||||||
add_next_index_zval(return_value, data);
|
add_next_index_zval(return_value, data);
|
||||||
MAKE_STD_ZVAL(data);
|
MAKE_STD_ZVAL(data);
|
||||||
} while (do_fetch(stmt, TRUE, data, how TSRMLS_CC));
|
} while (do_fetch(stmt, TRUE, data, how TSRMLS_CC));
|
||||||
|
FREE_ZVAL(data);
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue