|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 4 of 9] libxl: ensure result of libxl_poolid_to_name
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1281706573 -3600
# Node ID 4fa4efb9c63e1ef60daae928b0d7c5ca992681dd
# Parent 06e63fc8240a8d5902087947e016b7f69ab53071
libxl: ensure result of libxl_poolid_to_name is always dynamically allocated
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
diff -r 06e63fc8240a -r 4fa4efb9c63e tools/libxl/libxl_utils.c
--- a/tools/libxl/libxl_utils.c Fri Aug 13 14:36:13 2010 +0100
+++ b/tools/libxl/libxl_utils.c Fri Aug 13 14:36:13 2010 +0100
@@ -97,7 +97,7 @@ char *libxl_poolid_to_name(libxl_ctx *ct
char *s;
if (poolid == 0)
- return "Pool-0";
+ return strdup("Pool-0");
snprintf(path, sizeof(path), "/local/pool/%d/name", poolid);
s = xs_read(ctx->xsh, XBT_NULL, path, &len);
return s;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH 0 of 9] libxl: autogenerate type definitions and destructor functions, Ian Campbell
- [Xen-devel] [PATCH 1 of 9] xl: use the regular implicit rules to build the xl .o files, Ian Campbell
- [Xen-devel] [PATCH 3 of 9] libxl: move various enum and #defines above datastructure definitions, Ian Campbell
- [Xen-devel] [PATCH 2 of 9] libxl: define specific types for string list and key, value list, Ian Campbell
- [Xen-devel] [PATCH 4 of 9] libxl: ensure result of libxl_poolid_to_name is always dynamically allocated,
Ian Campbell <=
- [Xen-devel] [PATCH 6 of 9] libxl: tweak formatting/whitespace of _libxl_types.h, Ian Campbell
- [Xen-devel] [PATCH 5 of 9] libxl: move type definitions into _libxl_types.h, Ian Campbell
- [Xen-devel] [PATCH 9 of 9] xl: free the libxl types contained in struct domain_config, Ian Campbell
- [Xen-devel] [PATCH 8 of 9] libxl: generate destructors for each libxl defined type, Ian Campbell
- [Xen-devel] [PATCH 7 of 9] libxl: autogenerate _libxl_types.h, Ian Campbell
|
|
|
|
|