]> granicus.if.org Git - php/commitdiff
- Fixed memory leak in wddx_add_vars()
authorFelipe Pena <felipe@php.net>
Thu, 20 Nov 2008 14:47:29 +0000 (14:47 +0000)
committerFelipe Pena <felipe@php.net>
Thu, 20 Nov 2008 14:47:29 +0000 (14:47 +0000)
ext/wddx/wddx.c

index 3364a9a8b6dcb9ad98bbf15458ee799663f4d4d9..2aeef0ff320dcb2a98a21556ebe0784e59ef7660 100644 (file)
@@ -1274,7 +1274,10 @@ PHP_FUNCTION(wddx_add_vars)
                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);