mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.4'
* PHP-8.4: Fix memory leak on error return of collation callback in pdo_sqlite
This commit is contained in:
@@ -352,6 +352,7 @@ static int php_sqlite_collation_callback(void *context, int string1_len, const v
|
||||
zend_type_error("%s(): Return value of the callback must be of type int, %s returned",
|
||||
ZSTR_VAL(func_name), zend_zval_value_name(&retval));
|
||||
zend_string_release(func_name);
|
||||
zval_ptr_dtor(&retval);
|
||||
return FAILURE;
|
||||
}
|
||||
if (Z_LVAL(retval) > 0) {
|
||||
@@ -359,7 +360,6 @@ static int php_sqlite_collation_callback(void *context, int string1_len, const v
|
||||
} else if (Z_LVAL(retval) < 0) {
|
||||
ret = -1;
|
||||
}
|
||||
zval_ptr_dtor(&retval);
|
||||
}
|
||||
|
||||
zval_ptr_dtor(&zargs[0]);
|
||||
|
||||
Reference in New Issue
Block a user