Re: Freeing $1 from zend_language_parser.y

From: Date: Fri, 18 Nov 2011 16:30:01 +0000
Subject: Re: Freeing $1 from zend_language_parser.y
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-56399@lists.php.net to get a copy of this message
2011/11/18 Clint M Priest <cpriest@zerocue.com>: > Is there any reason I would have to free a pointer from the language_parser if I am just > storing a reference to $1 > > I'm doing this: > CG(accessor_node) = &$1; > This doesn't looks right, as &$1 points to the local variable in yyparse(). > And in doing so it is causing a memory leak, only if I add: > > efree($1.u.constant.value.str.val); > It's normal when not using the alloc'ed string into the op_array. -- Regards, Felipe Pena

« previous php.internals (#56399) next »