[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] add missing libxl__free_all() calls
On Thu, 9 Dec 2010, Gianni Tedesco wrote: > On Thu, 2010-12-09 at 13:51 +0000, Juergen Gross wrote: > > @@ -3760,8 +3772,10 @@ int libxl_destroy_cpupool(libxl_ctx *ctx > > libxl_cpumap cpumap; > > > > info = xc_cpupool_getinfo(ctx->xch, poolid); > > - if (info == NULL) > > - return ERROR_NOMEM; > > + if (info == NULL) { > > + libxl__free_all(&gc); > > + return ERROR_NOMEM; > > + } > > This one is un-necessary but harmless. The INIT_GC macro just zeros the > structure and allocates nothing. It might not be wise to rely on > programmer knowing that about the implementation in the long run... > I actually think that is a good idea to always call libxl__free_all before exiting. libxl__free_all should guarantee to do the right thing no matter if something has been allocated or not, so I am going to apply the patch as is. Thanks! Stefano _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |