diff options
-rw-r--r-- | ext/mysqlnd/mysqlnd_block_alloc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_block_alloc.c b/ext/mysqlnd/mysqlnd_block_alloc.c index 498d4b390b..40f42109f1 100644 --- a/ext/mysqlnd/mysqlnd_block_alloc.c +++ b/ext/mysqlnd/mysqlnd_block_alloc.c @@ -99,7 +99,12 @@ mysqlnd_mempool_resize_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk, unsigned int siz } } } else { - chunk->ptr = mnd_realloc(chunk->ptr, size); + zend_uchar *new_ptr = mnd_realloc(chunk->ptr, size); + if (!new_ptr) { + DBG_RETURN(FAIL); + } + chunk->ptr = new_ptr; + } DBG_RETURN(PASS); } |