From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli 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 10:39:10 +0200 Message-ID: <1438072750.2889.8.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: multipart/mixed; boundary="===============0246028359420269996==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZK0Q2-0001Yy-Oa for xen-devel@lists.xenproject.org; Tue, 28 Jul 2015 08:39:26 +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 Cc: Xen-devel , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org --===============0246028359420269996== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-p7+d+NeV611ZGdLsMOUz" --=-p7+d+NeV611ZGdLsMOUz Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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. >=20 > Also switch to libxl__realloc and call libxl_cpupool_{init,dispose} > where appropriate. >=20 > 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. >=20 > Signed-off-by: Wei Liu > Reviewed-by: Dario Faggioli Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-p7+d+NeV611ZGdLsMOUz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlW3P64ACgkQk4XaBE3IOsSoygCfem71YOIj7MJT93Vw3HjuFsAN phIAn15Y0Qar/E1nzIt+XS6tih9cFttm =nC2N -----END PGP SIGNATURE----- --=-p7+d+NeV611ZGdLsMOUz-- --===============0246028359420269996== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============0246028359420269996==--