From: Ian Campbell Subject: Re: [PATCH 2/3] tools/libxl/libxl_cpuid.c: Fix leak of resstr on error path Date: Wed, 18 Mar 2015 12:31:49 +0000 Message-ID: <1426681909.18247.365.camel@citrix.com> References: <1426500377-40643-1-git-send-email-pramod.devendra@citrix.com> <20150317154416.GC20522@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YYD8d-0000XW-Eb for xen-devel@lists.xenproject.org; Wed, 18 Mar 2015 12:31:55 +0000 In-Reply-To: <20150317154416.GC20522@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: xen-devel@lists.xenproject.org, PRAMOD DEVENDRA , Ian Jackson , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, 2015-03-17 at 15:44 +0000, Wei Liu wrote: > On Mon, Mar 16, 2015 at 10:06:17AM +0000, PRAMOD DEVENDRA wrote: > > From: Pramod Devendra > > > > Signed-off-by: Pramod Devendra > > CC: Ian Jackson > > CC: Stefano Stabellini > > CC: Ian Campbell > > CC: Wei Liu > > Acked-by: Wei Liu Applied. > > resstr = entry->policy[flag->reg - 1]; > > - if (resstr == NULL) { > > - resstr = strdup("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); > > - } > > Minor nit. I would prefer "resstr = " be grouped with the code you > moved. No need to resend though. Do you mean the restr = entry->... bit?