#20909 [Opn]: Memory leak in shutdown_scanner

From: Date: Thu, 12 Dec 2002 08:50:05 +0000
Subject: #20909 [Opn]: Memory leak in shutdown_scanner
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-27457@lists.php.net to get a copy of this message
ID: 20909 User updated by: sg@nesscorp.com Reported By: sg@nesscorp.com Status: Open Bug Type: *General Issues Operating System: ALL PHP Version: 4.2.3 New Comment: the file to patch is: Zend/zend_language_scanner.l Previous Comments: ------------------------------------------------------------------------ [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 (#27457) next »