Protect the code when variable is NULL, which should never happen, but
anyway, you know about "never happens" :)
This commit is contained in:
Andrey Hristov 2009-06-11 08:52:06 +00:00
parent cff09ba5df
commit 28c8d25dca

View file

@ -183,10 +183,12 @@ void
mysqlnd_mempool_destroy(MYSQLND_MEMORY_POOL * pool TSRMLS_DC)
{
DBG_ENTER("mysqlnd_mempool_destroy");
if (pool) {
/* mnd_free will reference LOCK_access and might crash, depending on the caller...*/
mysqlnd_mempool_free_contents(pool TSRMLS_CC);
mnd_free(pool->arena);
mnd_free(pool);
}
DBG_VOID_RETURN;
}
/* }}} */