diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-05-03 22:50:00 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-05-03 22:50:00 +0000 |
commit | bdbce01588f326798844b25cf059596b44db119c (patch) | |
tree | 58e18add865a24a84c6b4c19c2d257165325b3f5 /ext/pgsql/pgsql.c | |
parent | d6d9b15ef73738e37a4bb7e5fe3d2d7761ab78ea (diff) | |
download | php-git-bdbce01588f326798844b25cf059596b44db119c.tar.gz |
Prevent double free.
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r-- | ext/pgsql/pgsql.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index bbcbd2362c..1d63ec264d 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -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; + } } /* }}} */ |