mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Check if realloc() succeeds or not. (Noticed by Andrey)
This commit is contained in:
parent
03c09f200c
commit
68a096f84e
@ -408,6 +408,9 @@ void *zend_mm_realloc(zend_mm_heap *heap, void *p, size_t size)
|
||||
/* segment size, size of block and size of guard block */
|
||||
realloc_to_size = ZEND_MM_ALIGNED_SEGMENT_SIZE+true_size+ZEND_MM_ALIGNED_HEADER_SIZE;
|
||||
segment = realloc(segment, realloc_to_size);
|
||||
if (!segment) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (segment != segment_copy) {
|
||||
if (heap->segments_list == segment_copy) {
|
||||
|
Loading…
Reference in New Issue
Block a user