andrey                                   Wed, 17 Mar 2010 18:08:25 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=296332

Log:
Fix for complaint from the Zend MM, efree of a NULL pointer.

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c    2010-03-17 
18:00:47 UTC (rev 296331)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c    2010-03-17 
18:08:25 UTC (rev 296332)
@@ -828,7 +828,9 @@
                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));

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to