Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56399 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3511 invoked from network); 18 Nov 2011 16:30:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Nov 2011 16:30:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=felipensp@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=felipensp@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.44 as permitted sender) X-PHP-List-Original-Sender: felipensp@gmail.com X-Host-Fingerprint: 209.85.210.44 mail-pz0-f44.google.com Received: from [209.85.210.44] ([209.85.210.44:41167] helo=mail-pz0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/90-06569-02886CE4 for ; Fri, 18 Nov 2011 11:30:25 -0500 Received: by pzk33 with SMTP id 33so12388638pzk.3 for ; Fri, 18 Nov 2011 08:30:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=vNx4zlpoRzczKKPM/T9Q4ZGII5S20B5lsFs9zLrk/co=; b=Vxsj6eZO/b6lHP8k3Si7MlJeYXJnylynJleaa28VBWQshn4dAf8n6A3AnDD3bUhoY1 ZwVW6o2eXZX/lQAplbt1bWqfqKLagFdVw7bl1BOmozgpUMCTvKBlmB/TFtynvXj04EHo adTb4b/sU1992VIYIXtS/cH4RQEeEfkHBP+dg= Received: by 10.68.11.233 with SMTP id t9mr5393733pbb.121.1321633822071; Fri, 18 Nov 2011 08:30:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.44.5 with HTTP; Fri, 18 Nov 2011 08:30:01 -0800 (PST) In-Reply-To: <9570D903A3BECE4092E924C2985CE485398106C9@MBX206.domain.local> References: <9570D903A3BECE4092E924C2985CE485398106C9@MBX206.domain.local> Date: Fri, 18 Nov 2011 14:30:01 -0200 Message-ID: To: Clint M Priest Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Freeing $1 from zend_language_parser.y From: felipensp@gmail.com (Felipe Pena) 2011/11/18 Clint M Priest : > 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