mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
Prevent double free.
This commit is contained in:
parent
d6d9b15ef7
commit
bdbce01588
1 changed files with 5 additions and 2 deletions
|
@ -356,8 +356,11 @@ static void _php_pgsql_notice_handler(void *resource_id, const char *message)
|
||||||
static void _php_pgsql_notice_ptr_dtor(void **ptr)
|
static void _php_pgsql_notice_ptr_dtor(void **ptr)
|
||||||
{
|
{
|
||||||
php_pgsql_notice *notice = (php_pgsql_notice *)*ptr;
|
php_pgsql_notice *notice = (php_pgsql_notice *)*ptr;
|
||||||
efree(notice->message);
|
if (notice) {
|
||||||
efree(notice);
|
efree(notice->message);
|
||||||
|
efree(notice);
|
||||||
|
notice = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue