From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: Re: [PATCH v3 02/10] libxl: turn two malloc's to libxl__malloc Date: Tue, 14 Jul 2015 18:19:56 +0100 Message-ID: <21925.17596.147539.455131@mariner.uk.xensource.com> References: <1436892073-14186-1-git-send-email-wei.liu2@citrix.com> <1436892073-14186-3-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 1ZF3sJ-0006Uy-A1 for xen-devel@lists.xenproject.org; Tue, 14 Jul 2015 17:20:11 +0000 In-Reply-To: <1436892073-14186-3-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 Cc: Xen-devel , Ian Campbell List-Id: xen-devel@lists.xenproject.org Wei Liu writes ("[PATCH v3 02/10] libxl: turn two malloc's to libxl__malloc"): > One is to combine malloc + libxl__alloc_failed. The other is to avoid > dereferencing NULL pointer in case of malloc failure. Also use gc for > memory allocation and remove free() in second case. Acked-by: Ian Jackson