#20909 [Opn->Csd]: Memory leak in shutdown_scanner

From: Date: Fri, 13 Dec 2002 16:28:06 +0000
Subject: #20909 [Opn->Csd]: Memory leak in shutdown_scanner
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-27627@lists.php.net to get a copy of this message
ID: 20909 Updated by: iliaa@php.net Reported By: sg@nesscorp.com -Status: Open +Status: Closed Bug Type: *General Issues Operating System: ALL PHP Version: 4.2.3 New Comment: This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-12-12 02:50:04] sg@nesscorp.com the file to patch is: Zend/zend_language_scanner.l ------------------------------------------------------------------------ [2002-12-09 09:32:25] sg@nesscorp.com There is a memory leak in the scanner stack: A patch like this should work: void shutdown_scanner(TSRMLS_D) { + if (SCNG(yy_start_stack)) { + yy_flex_free(SCNG(yy_start_stack)); + SCNG(yy_start_stack) = 0; + } if (CG(heredoc)) { efree(CG(heredoc)); CG(heredoc_len)=0; } } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20909&edit=1

« previous php.bugs (#27627) next »