From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH for-4.6 v2 1/8] libxl: properly clean up array in libxl_list_cpupool failure path Date: Tue, 28 Jul 2015 11:27:07 +0100 Message-ID: <1438079227.11600.114.camel@citrix.com> References: <1438019109-31997-1-git-send-email-wei.liu2@citrix.com> <1438019109-31997-2-git-send-email-wei.liu2@citrix.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 1ZK26O-00008z-8i for xen-devel@lists.xenproject.org; Tue, 28 Jul 2015 10:27:16 +0000 In-Reply-To: <1438019109-31997-2-git-send-email-wei.liu2@citrix.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 , Xen-devel Cc: Dario Faggioli , Ian Jackson List-Id: xen-devel@lists.xenproject.org On Mon, 2015-07-27 at 18:45 +0100, Wei Liu wrote: > Document how cpupool_info works. Distinguish success (ERROR_FAIL + > ENOENT) vs failure in libxl_list_cpupool and properly clean up the array > in failure path. > > Also switch to libxl__realloc and call libxl_cpupool_{init,dispose} > where appropriate. > > There is change of behaviour. Previously if memory allocation fails the > said function returns NULL. Now memory allocation failure is fatal. This > is in line with how we deal with memory allocation failure in other > places in libxl though. > > Signed-off-by: Wei Liu Acked-by: Ian Campbell