libxl: fix memory leak in libxl_name_to_poolid
PATCH 1/1 libxl: fix memory leak in libxl_name_to_poolid
Hi,
attached patch is similar to cs 21908, just other function...
Juergen
Signature · 5 lines
Juergen Gross Principal Developer Operating Systems TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967 Fujitsu Technology Solutions e-mail: [email protected] Domagkstr. 28 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html
Signed-off-by [email protected]
tools/libxl/libxl_utils.c +5 -2
@@ -101,6 +101,7 @@ int libxl_name_to_poolid(libxl_ctx *ctx,int i, nb_pools;char *poolname;libxl_poolinfo *poolinfo; +int ret =-1 ; poolinfo =libxl_list_pool (ctx, &nb_pools);if (!poolinfo)
@@ -112,10 +113,12 @@ int libxl_name_to_poolid(libxl_ctx *ctx,continue ;if (strcmp (poolname, name) ==0 ) { *poolid = poolinfo[i].poolid; -return 0 ; + ret =0 ; +break ; } } -return -1 ; +free (poolinfo); +return ret; }int libxl_get_stubdom_id (libxl_ctx *ctx,int guest_domid)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Stefano Stabellini
AppliedQuoted 4 lines · Juergen Gross
Hi,
attached patch is similar to cs 21908, just other function...
applied, thanks