One more case to handle in case of OOM, in block_alloc_resize_chunk

This commit is contained in:
Andrey Hristov 2010-05-03 14:26:08 +00:00
parent 8e8348a4b0
commit 57059d4e31

View File

@ -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);
}