From: Antony Dovgal Date: Thu, 3 Aug 2006 19:35:14 +0000 (+0000) Subject: fix leak in php_sapi_filter() X-Git-Tag: RELEASE_1_0_0RC1~2110 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b9404ba522cd3a4b56cc815af3f23948b5f40e28;p=php fix leak in php_sapi_filter() --- diff --git a/ext/filter/filter.c b/ext/filter/filter.c index 3d6477edce..1eeef2def2 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -405,10 +405,10 @@ static unsigned int php_sapi_filter(int arg, char *var, char **val, unsigned int efree(*val); if (Z_STRLEN(new_var)) { *val = estrndup(Z_STRVAL(new_var), Z_STRLEN(new_var) + 1); - zval_dtor(&new_var); } else { *val = estrdup(""); } + zval_dtor(&new_var); } return retval;