[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: fix memory leak in libxl_name_to_poolid
# HG changeset patch # User Juergen Gross <juergen.gross@xxxxxxxxxxxxxx> # Date 1281004393 -3600 # Node ID baaa4b9d385f5d00083413dad1d65570c2f5fae7 # Parent d627f6b581b4346b5edb13d341e027b22c15f1a1 libxl: fix memory leak in libxl_name_to_poolid Signed-off-by: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> --- tools/libxl/libxl_utils.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff -r d627f6b581b4 -r baaa4b9d385f tools/libxl/libxl_utils.c --- a/tools/libxl/libxl_utils.c Wed Aug 04 18:08:39 2010 +0100 +++ b/tools/libxl/libxl_utils.c Thu Aug 05 11:33:13 2010 +0100 @@ -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; - } - } - return -1; + ret = 0; + break; + } + } + free(poolinfo); + return ret; } int libxl_get_stubdom_id(libxl_ctx *ctx, int guest_domid) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |