]> granicus.if.org Git - php/commitdiff
Fix freeing of a NULL pointer
authorSascha Schumann <sas@php.net>
Sun, 22 Apr 2001 17:20:03 +0000 (17:20 +0000)
committerSascha Schumann <sas@php.net>
Sun, 22 Apr 2001 17:20:03 +0000 (17:20 +0000)
ext/pcre/php_pcre.c

index 8c7bf18b558e9436b9465b8e6eb5db698e81dc0f..89a55a866d8046debf8a8366ef6b9fbbe2c908cb 100644 (file)
@@ -60,7 +60,7 @@ static void php_free_pcre_cache(void *data)
        pcre_cache_entry *pce = (pcre_cache_entry *) data;
        pefree(pce->re, 1);
 #if HAVE_SETLOCALE
-       pefree((void*)pce->tables, 1);
+       if ((void*)pce->tables) pefree((void*)pce->tables, 1);
 #endif
 }