iliaa Thu Oct 10 10:46:07 2002 EDT Modified files: /php4/ext/pfpro pfpro.c Log: Fixed a few more memory leaks. Index: php4/ext/pfpro/pfpro.c diff -u php4/ext/pfpro/pfpro.c:1.24 php4/ext/pfpro/pfpro.c:1.25 --- php4/ext/pfpro/pfpro.c:1.24 Wed Oct 9 22:23:23 2002 +++ php4/ext/pfpro/pfpro.c Thu Oct 10 10:46:06 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pfpro.c,v 1.24 2002/10/10 02:23:23 sniper Exp $ */ +/* $Id: pfpro.c,v 1.25 2002/10/10 14:46:06 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -419,6 +419,9 @@ default: php_error(E_ERROR, "pfpro_process() array keys must be strings or integers"); + if (parmlist) { + efree(parmlist); + } efree(args); RETURN_FALSE; } @@ -462,6 +465,9 @@ default: php_error(E_ERROR, "pfpro_process() array values must be strings, ints or floats"); + if (parmlist) { + efree(parmlist); + } efree(args); RETURN_FALSE; } @@ -483,10 +489,7 @@ /* Allocate the array for the response now - so we catch any errors from this BEFORE we knock it off to the bank */ - if (array_init(return_value) == FAILURE) { - php_error(E_ERROR, "pfpro_process() unable to create array"); - RETURN_FALSE; - } + array_init(return_value); #if PFPRO_VERSION < 3 /* Blank the response buffer */ @@ -514,7 +517,7 @@ efree(address); } - if (pass) { + if (parmlist) { efree(parmlist); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php