mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00
Fix leaks.
This commit is contained in:
parent
d85822062a
commit
263d329acd
1 changed files with 2 additions and 0 deletions
|
@ -1290,6 +1290,7 @@ static int php_extract_prefix_varname(zval *result, zval *prefix, zstr var_name,
|
||||||
Z_USTRVAL_P(result) = eurealloc(Z_USTRVAL_P(result), Z_USTRLEN_P(result)+1);
|
Z_USTRVAL_P(result) = eurealloc(Z_USTRVAL_P(result), Z_USTRLEN_P(result)+1);
|
||||||
}
|
}
|
||||||
u_memcpy(Z_USTRVAL_P(result)+Z_USTRLEN_P(prefix)+1, buf, buf_len+1);
|
u_memcpy(Z_USTRVAL_P(result)+Z_USTRLEN_P(prefix)+1, buf, buf_len+1);
|
||||||
|
efree(buf);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Z_TYPE_P(result) = IS_STRING;
|
Z_TYPE_P(result) = IS_STRING;
|
||||||
|
@ -1316,6 +1317,7 @@ static int php_extract_prefix_varname(zval *result, zval *prefix, zstr var_name,
|
||||||
Z_STRVAL_P(result) = erealloc(Z_STRVAL_P(result), Z_STRLEN_P(result)+1);
|
Z_STRVAL_P(result) = erealloc(Z_STRVAL_P(result), Z_STRLEN_P(result)+1);
|
||||||
}
|
}
|
||||||
memcpy(Z_STRVAL_P(result)+Z_STRLEN_P(prefix)+1, buf, buf_len+1);
|
memcpy(Z_STRVAL_P(result)+Z_STRLEN_P(prefix)+1, buf, buf_len+1);
|
||||||
|
efree(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue