Skip to content

Commit a0a1c89

Browse files
committed
Fixed incorrect reallocation
1 parent f307e59 commit a0a1c89

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ext/opcache/zend_accelerator_util_funcs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ static void zend_hash_clone_methods(HashTable *ht, HashTable *source, zend_class
178178
new_entry->prototype = ARENA_REALLOC(new_entry->prototype);
179179
}
180180
}
181-
ZEND_MAP_PTR_INIT(new_entry->run_time_cache, ARENA_REALLOC(ZEND_MAP_PTR(new_entry->run_time_cache)));
181+
if (IN_ARENA(ZEND_MAP_PTR(new_entry->run_time_cache))) {
182+
ZEND_MAP_PTR_INIT(new_entry->run_time_cache, ARENA_REALLOC(ZEND_MAP_PTR(new_entry->run_time_cache)));
183+
}
182184
ZEND_MAP_PTR_INIT(new_entry->static_variables_ptr, &new_entry->static_variables);
183185
}
184186
}

0 commit comments

Comments
 (0)