|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] libxl: make libxl_ctx_free tolerate NULL
# HG changeset patch
# User Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
# Date 1307036793 -3600
# Node ID 085575a5150e256647a5a069a45631823a9656c6
# Parent a0a476860f2e49e346dd17d177aa99336b0b3ab4
libxl: make libxl_ctx_free tolerate NULL ctx argument
This is purely for convenience (eg, when debugging).
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
diff -r a0a476860f2e -r 085575a5150e tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Thu Jun 02 18:46:32 2011 +0100
+++ b/tools/libxl/libxl.c Thu Jun 02 18:46:33 2011 +0100
@@ -85,6 +85,7 @@
int libxl_ctx_free(libxl_ctx *ctx)
{
+ if (!ctx) return 0;
if (ctx->xch) xc_interface_close(ctx->xch);
libxl_version_info_destroy(&ctx->version_info);
if (ctx->xsh) xs_daemon_close(ctx->xsh);
diff -r a0a476860f2e -r 085575a5150e tools/libxl/libxl.h
--- a/tools/libxl/libxl.h Thu Jun 02 18:46:32 2011 +0100
+++ b/tools/libxl/libxl.h Thu Jun 02 18:46:33 2011 +0100
@@ -232,7 +232,7 @@
/* context functions */
int libxl_ctx_alloc(libxl_ctx **pctx, int version, xentoollog_logger *lg);
-int libxl_ctx_free(libxl_ctx *ctx);
+int libxl_ctx_free(libxl_ctx *ctx /* 0 is OK */);
int libxl_ctx_postfork(libxl_ctx *ctx);
/* domain related functions */
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] libxl: make libxl_ctx_free tolerate NULL ctx argument,
Xen patchbot-unstable <=
|
|
|
|
|