From: Jérôme Loyet Date: Tue, 14 Sep 2010 15:33:43 +0000 (+0000) Subject: - remove a memory leak (missing efree()) X-Git-Tag: php-5.4.0alpha1~191^2~953 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b9ed0d3692330efdef24d0ef2b313ed2cf3268a;p=php - remove a memory leak (missing efree()) --- diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c index 7d25a044fa..ad7c86e9a9 100644 --- a/sapi/fpm/fpm/fpm_conf.c +++ b/sapi/fpm/fpm/fpm_conf.c @@ -716,11 +716,13 @@ static void fpm_conf_ini_parser_include(char *inc, void *arg TSRMLS_DC) /* {{{ * #ifdef GLOB_NOMATCH if (i == GLOB_NOMATCH) { zlog(ZLOG_STUFF, ZLOG_WARNING, "Nothing matches the include pattern '%s' from %s at line %d.", inc, filename, ini_lineno); + efree(filename); return; } #endif /* GLOB_NOMATCH */ zlog(ZLOG_STUFF, ZLOG_ERROR, "Unable to globalize '%s' (ret=%d) from %s at line %d.", inc, i, filename, ini_lineno); *error = 1; + efree(filename); return; } @@ -731,6 +733,7 @@ static void fpm_conf_ini_parser_include(char *inc, void *arg TSRMLS_DC) /* {{{ * if (0 > fpm_conf_load_ini_file(g.gl_pathv[i] TSRMLS_CC)) { zlog(ZLOG_STUFF, ZLOG_ERROR, "Unable to include %s from %s at line %d", g.gl_pathv[i], filename, ini_lineno); *error = 1; + efree(filename); return; } } @@ -740,9 +743,12 @@ static void fpm_conf_ini_parser_include(char *inc, void *arg TSRMLS_DC) /* {{{ * if (0 > fpm_conf_load_ini_file(inc TSRMLS_CC)) { zlog(ZLOG_STUFF, ZLOG_ERROR, "Unable to include %s from %s at line %d", inc, filename, ini_lineno); *error = 1; + efree(filename); return; } #endif /* HAVE_GLOB */ + + efree(filename); } /* }}} */