[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 3 of 3] xl: don't leak uuid string on xl list



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1281709714 -3600
# Node ID 0a55168059b6c875d5923fd56d908db4636f4a74
# Parent  cf21a4ad0e798f76adb91453769a36e0856ccd12
xl: don't leak uuid string on xl list

==10272== 37 bytes in 1 blocks are definitely lost in loss record 1 of 1
==10272==    at 0x4022F0A: malloc (vg_replace_malloc.c:236)
==10272==    by 0x4047B2B: libxl_uuid2string (libxl_dom.c:457)
==10272==    by 0x8050A02: list_domains (xl_cmdimpl.c:2198)
==10272==    by 0x8054FC5: main_list (xl_cmdimpl.c:3064)
==10272==    by 0x804B5AB: main (xl.c:76)

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r cf21a4ad0e79 -r 0a55168059b6 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Fri Aug 13 15:25:09 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Fri Aug 13 15:28:34 2010 +0100
@@ -2197,6 +2197,7 @@ void list_domains(int verbose, const lib
         if (verbose) {
             char *uuid = libxl_uuid2string(&ctx, info[i].uuid);
             printf(" %s", uuid);
+            free(uuid);
         }
         putchar('\n');
     }

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.