summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_debug.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2010-03-17 18:08:25 +0000
committerAndrey Hristov <andrey@php.net>2010-03-17 18:08:25 +0000
commit981ba00606191c2b010ec49b7e21b8731afe86aa (patch)
tree87188124dc7a05ab4f511dbf1de0e0eaa02af6e2 /ext/mysqlnd/mysqlnd_debug.c
parent4941b23bcd0f2dd56bb903dbd8d9da33a7d6b63f (diff)
downloadphp-git-981ba00606191c2b010ec49b7e21b8731afe86aa.tar.gz
Fix for complaint from the Zend MM, efree of a NULL pointer.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_debug.c')
-rw-r--r--ext/mysqlnd/mysqlnd_debug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_debug.c b/ext/mysqlnd/mysqlnd_debug.c
index 085a8ed55b..4ede83663f 100644
--- a/ext/mysqlnd/mysqlnd_debug.c
+++ b/ext/mysqlnd/mysqlnd_debug.c
@@ -828,7 +828,9 @@ void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D)
DBG_INF_FMT("before: %lu", zend_memory_usage(persistent TSRMLS_CC));
}
- pefree(ptr, persistent);
+ if (ptr) {
+ pefree(ptr, persistent);
+ }
if (persistent == FALSE) {
DBG_INF_FMT("after : %lu", zend_memory_usage(persistent TSRMLS_CC));