From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent Hanquez Subject: Re: [PATCH 3/4] libxl: add version_info function [and 1 more messages] Date: Mon, 19 Apr 2010 17:07:32 +0100 Message-ID: <4BCC7FC4.10800@eu.citrix.com> References: <4BCB76FD.1020103@amd.com> <4BCB791E.7000204@amd.com> <4BCC0F86.8090707@eu.citrix.com> <19404.30856.176804.871256@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <19404.30856.176804.871256@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: Andre Przywara , "xen-devel@lists.xensource.com" , Keir Fraser , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 19/04/10 16:36, Ian Jackson wrote: > I don't think that's correct because memory allocated by libxl_sprintf > does not survive return from libxl into the caller. It survives as long as the context is not ctx_free. i.e. if the data need to preserve longer, they will have do be duplicated before freeing the context. This is to get away with having to deal with memory leak as much as possible and potential more complex code related to errors handling. -- Vincent