#39495 [Opn->Asn]: memory leak with php_pcre_match()

From: Date: Tue, 14 Nov 2006 09:33:39 +0000
Subject: #39495 [Opn->Asn]: memory leak with php_pcre_match()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-104985@lists.php.net to get a copy of this message
ID: 39495 Updated by: tony2001@php.net Reported By: rsky0711 at gmail dot com -Status: Open +Status: Assigned Bug Type: PCRE related Operating System: ALL PHP Version: 4.4.4 -Assigned To: +Assigned To: andrei 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 (#104985) next »