mirror of
https://github.com/php/php-src.git
synced 2026-04-30 03:33:17 +02:00
fix leak in php_sapi_filter()
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user