mirror of
https://github.com/php/php-src.git
synced 2025-01-22 11:44:09 +08:00
- Fix #55301 (url scanner part) check if malloc succeded
This commit is contained in:
parent
618b480d91
commit
74de7dd66d
@ -57,9 +57,12 @@ static PHP_INI_MH(OnUpdateTags)
|
||||
|
||||
if (ctx->tags)
|
||||
zend_hash_destroy(ctx->tags);
|
||||
else
|
||||
else {
|
||||
ctx->tags = malloc(sizeof(HashTable));
|
||||
|
||||
if (!ctx->tags) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
zend_hash_init(ctx->tags, 0, NULL, NULL, 1);
|
||||
|
||||
for (key = php_strtok_r(tmp, ",", &lasts);
|
||||
|
@ -55,9 +55,13 @@ static PHP_INI_MH(OnUpdateTags)
|
||||
|
||||
if (ctx->tags)
|
||||
zend_hash_destroy(ctx->tags);
|
||||
else
|
||||
else {
|
||||
ctx->tags = malloc(sizeof(HashTable));
|
||||
|
||||
if (!ctx->tags) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
zend_hash_init(ctx->tags, 0, NULL, NULL, 1);
|
||||
|
||||
for (key = php_strtok_r(tmp, ",", &lasts);
|
||||
|
Loading…
Reference in New Issue
Block a user