diff options
author | Dmitry Stogov <dmitry@php.net> | 2011-08-11 06:38:42 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2011-08-11 06:38:42 +0000 |
commit | cea8df3af56a1947b82da86361281a18808b7bbb (patch) | |
tree | beb07cef92a27e2521fd3fedfc959244867df66a | |
parent | de90c602e1f23637a65a5dd79f5b4fc5db848a3d (diff) | |
download | php-git-cea8df3af56a1947b82da86361281a18808b7bbb.tar.gz |
Fixed possible memory leak
-rw-r--r-- | sapi/cgi/cgi_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index b11785f1a8..0e108af6fa 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -725,7 +725,7 @@ static void php_cgi_ini_activate_user_config(char *path, int path_len, const cha /* Check whether cache entry has expired and rescan if it is */ if (request_time > entry->expires) { - char * real_path; + char *real_path = NULL; int real_path_len; char *s1, *s2; int s_len; @@ -774,6 +774,9 @@ static void php_cgi_ini_activate_user_config(char *path, int path_len, const cha php_parse_user_ini_file(path, PG(user_ini_filename), entry->user_config TSRMLS_CC); } + if (real_path) { + free(real_path); + } entry->expires = request_time + PG(user_ini_cache_ttl); } |