From: Ian Jackson Subject: Re: [PATCH 08/13 v5] libxl: don't leak ptr in libxl_list_vm error case [and 1 more messages] Date: Mon, 16 Dec 2013 11:57:09 +0000 Message-ID: <21166.60053.71660.214036@mariner.uk.xensource.com> References: <21148.41308.706376.518540@mariner.uk.xensource.com> <1386034144-9572-1-git-send-email-mattd@bugfuzz.com> <1386066096.16012.59.camel@kazak.uk.xensource.com> <21163.15190.993775.174911@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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 List-Id: xen-devel@lists.xenproject.org Matthew Daley writes ("Re: [PATCH 08/13 v5] libxl: don't leak ptr in libxl_list_vm error case [and 1 more messages]"): > On Sat, Dec 14, 2013 at 12:22 PM, Matthew Daley wrote: > > For the record, for custom wrapper functions like these I usually > > prefer to stick as close to the existing functions' semantics as > > possible, not so much out of love for standards but out of desiring > > the absence of surprising behaviour. > > Although, I suppose changing things wrt. the standards would just > introduce new slightly-surprising behaviours vs. having existing > really-surprising ones... Precisely. And anyone surprised by the lack of a workaround for some standard misbeaviour of malloc or realloc would hopefully go and find the doc comment for the wrapper and be reassured. Ian.