mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix memleak
This commit is contained in:
parent
8e0516c990
commit
bbfa7cae25
1 changed files with 9 additions and 0 deletions
|
@ -1030,6 +1030,9 @@ PHP_FUNCTION(sqlite_popen)
|
|||
&filename, &filename_len, &mode, &errmsg)) {
|
||||
return;
|
||||
}
|
||||
if (errmsg) {
|
||||
zval_dtor(errmsg);
|
||||
}
|
||||
|
||||
if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {
|
||||
/* resolve the fully-qualified path name to use as the hash key */
|
||||
|
@ -1095,6 +1098,9 @@ PHP_FUNCTION(sqlite_open)
|
|||
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
|
||||
return;
|
||||
}
|
||||
if (errmsg) {
|
||||
zval_dtor(errmsg);
|
||||
}
|
||||
|
||||
if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {
|
||||
if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
|
||||
|
@ -1137,6 +1143,9 @@ PHP_FUNCTION(sqlite_factory)
|
|||
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
|
||||
RETURN_NULL();
|
||||
}
|
||||
if (errmsg) {
|
||||
zval_dtor(errmsg);
|
||||
}
|
||||
|
||||
if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
|
||||
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue