Prevent double free.

This commit is contained in:
Ilia Alshanetsky 2005-05-03 22:50:00 +00:00
parent d6d9b15ef7
commit bdbce01588

View file

@ -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)
{
php_pgsql_notice *notice = (php_pgsql_notice *)*ptr;
efree(notice->message);
efree(notice);
if (notice) {
efree(notice->message);
efree(notice);
notice = NULL;
}
}
/* }}} */