From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: Re: [PATCH 12/13 v2] libxl: don't leak buf in libxl_xen_console_read_start error handling Date: Tue, 3 Dec 2013 17:26:33 +0000 Message-ID: <21150.5193.604129.176669@mariner.uk.xensource.com> References: <21148.31812.774951.309874@mariner.uk.xensource.com> <1386032465-7591-1-git-send-email-mattd@bugfuzz.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1386032465-7591-1-git-send-email-mattd@bugfuzz.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: Matthew Daley Cc: Andrew Cooper , Stefano Stabellini , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Matthew Daley writes ("[PATCH 12/13 v2] libxl: don't leak buf in libxl_xen_console_read_start error handling"): > Use libxl__zallocs instead of plain mallocs + memset. > > Coverity-ID: 1055889 > Signed-off-by: Matthew Daley Acked-by: Ian Jackson Committed-by: Ian Jackson > v2: Use libxl__zallocs instead of custom error handling. I'm not sure if this > is what you had in mind, Ian, specifically the use of GC_INIT/GC_FREE and > NOGC vs. just using &ctx->nogc_gc Yes, this was exactly what I meant. As a bonus it's now much shorter and also more obviously correct :-). Thanks, Ian.