From: Felipe Pena Date: Thu, 20 Nov 2008 14:48:41 +0000 (+0000) Subject: - MFH: Fixed memory leak in wddx_add_vars() X-Git-Tag: php-5.3.0alpha2~122 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8258b703c5b5245e75280e7242ba43448294763e;p=php - MFH: Fixed memory leak in wddx_add_vars() --- diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index 3586d201b5..a4dfdcbd4d 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -1278,7 +1278,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);