#39495 [Asn->WFx]: memory leak with php_pcre_match() (PHP 4 only!)

From: Date: Sun, 06 Jul 2008 17:04:25 +0000
Subject: #39495 [Asn->WFx]: memory leak with php_pcre_match() (PHP 4 only!)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-126323@lists.php.net to get a copy of this message
ID: 39495 Updated by: nlopess@php.net Reported By: rsky0711 at gmail dot com -Status: Assigned +Status: Wont fix Bug Type: PCRE related Operating System: ALL PHP Version: 4.4.4 Assigned To: andrei New Comment: PHP 4 is dead. also those lines are never reached in practice. Previous Comments: ------------------------------------------------------------------------ [2006-11-13 13:40:06] rsky0711 at gmail dot com 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 this bug report at http://bugs.php.net/?id=39495&edit=1

« previous php.bugs (#126323) next »