1
0
mirror of https://github.com/php/php-src.git synced 2026-04-12 02:23:18 +02:00

Fix early free

This commit is contained in:
Nikita Popov
2017-01-03 02:12:28 +01:00
parent f12f0b2bc2
commit e1e5caf9d4

View File

@@ -248,7 +248,6 @@ static zend_string *browscap_intern_str_ci(
ZSTR_ALLOCA_ALLOC(lcname, ZSTR_LEN(str), use_heap);
zend_str_tolower_copy(ZSTR_VAL(lcname), ZSTR_VAL(str), ZSTR_LEN(str));
interned = zend_hash_find_ptr(&ctx->str_interned, lcname);
ZSTR_ALLOCA_FREE(lcname, use_heap);
if (interned) {
zend_string_addref(interned);
@@ -257,6 +256,7 @@ static zend_string *browscap_intern_str_ci(
zend_hash_add_new_ptr(&ctx->str_interned, interned, interned);
}
ZSTR_ALLOCA_FREE(lcname, use_heap);
return interned;
}