felipe          Thu Nov 20 14:47:29 2008 UTC

  Modified files:              
    /php-src/ext/wddx   wddx.c 
  Log:
  - Fixed memory leak in wddx_add_vars()
  
http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/wddx.c?r1=1.159&r2=1.160&diff_format=u
Index: php-src/ext/wddx/wddx.c
diff -u php-src/ext/wddx/wddx.c:1.159 php-src/ext/wddx/wddx.c:1.160
--- php-src/ext/wddx/wddx.c:1.159       Thu Nov 20 14:34:34 2008
+++ php-src/ext/wddx/wddx.c     Thu Nov 20 14:47:29 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: wddx.c,v 1.159 2008/11/20 14:34:34 magicaltux Exp $ */
+/* $Id: wddx.c,v 1.160 2008/11/20 14:47:29 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1274,7 +1274,10 @@
                return;
        }
 
-       ZEND_FETCH_RESOURCE(packet, wddx_packet *, &packet_id, -1, "WDDX packet 
ID", le_wddx);
+       if (!ZEND_FETCH_RESOURCE_NO_RETURN(packet, wddx_packet *, &packet_id, 
-1, "WDDX packet ID", le_wddx)) {
+               efree(args);
+               RETURN_FALSE;
+       }
 
        if (!packet) {
                efree(args);



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

Reply via email to