#39495 [NEW]: memory leak with php_pcre_match()

From: Date: Mon, 13 Nov 2006 13:40:07 +0000
Subject: #39495 [NEW]: memory leak with php_pcre_match()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-104906@lists.php.net to get a copy of this message
From: rsky0711 at gmail dot com Operating system: ALL PHP version: 4.4.4 PHP Bug Type: PCRE related Bug description: memory leak with php_pcre_match() Description: ------------ This is a patch. This problem is already fixed in PHP_5_1, PHP_5_2 and HEAD branch. --- php_pcre.c.orig 2006-11-13 21:56:27.000000000 +0900 +++ php_pcre.c 2006-11-13 21:58:42.000000000 +0900 @@ -454,6 +454,8 @@ if (rc < 0) { php_error(E_WARNING, "%s: internal pcre_fullinfo () error %d", get_active_function_name(TSRMLS_C), rc); + efree(offsets); + efree(subpat_names); RETURN_FALSE; } if (name_cnt > 0) { @@ -464,6 +466,8 @@ if (rc < 0) { php_error(E_WARNING, "%s: internal pcre_fullinfo() error %d", get_active_function_name (TSRMLS_C), rc); + efree(offsets); + efree(subpat_names); RETURN_FALSE; } -- Edit bug report at http://bugs.php.net/?id=39495&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39495&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39495&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39495&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39495&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39495&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39495&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39495&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39495&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39495&r=support Expected behavior: http://bugs.php.net/fix.php?id=39495&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39495&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39495&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39495&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39495&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39495&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39495&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39495&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39495&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39495&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39495&r=mysqlcfg

« previous php.bugs (#104906) next »