mirror of
https://github.com/php/php-src.git
synced 2024-12-12 19:33:31 +08:00
Fixed possible memory leak
This commit is contained in:
parent
14948624af
commit
a5d3c2972e
@ -761,7 +761,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;
|
||||
@ -809,6 +809,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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user