iliaa           Tue May  3 18:50:02 2005 EDT

  Modified files:              
    /php-src/ext/pgsql  pgsql.c 
  Log:
  Prevent double free.
  
  
http://cvs.php.net/diff.php/php-src/ext/pgsql/pgsql.c?r1=1.324&r2=1.325&ty=u
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.324 php-src/ext/pgsql/pgsql.c:1.325
--- php-src/ext/pgsql/pgsql.c:1.324     Wed Apr 13 18:11:35 2005
+++ php-src/ext/pgsql/pgsql.c   Tue May  3 18:50:00 2005
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
  */
  
-/* $Id: pgsql.c,v 1.324 2005/04/13 22:11:35 tony2001 Exp $ */
+/* $Id: pgsql.c,v 1.325 2005/05/03 22:50:00 iliaa Exp $ */
 
 #include <stdlib.h>
 
@@ -356,8 +356,11 @@
 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;
+       }
 }
 /* }}} */
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to