libxl: Fix NULL deref in libxl_ctx_free()

xc_interface_close() will de-reference a NULL handle, check for this
condition in libxl_ctx_free() before calling.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
Gianni Tedesco committed 2010-09-07 19:05:17 +01:00
1 parent a1c6702f19
commit ec7b9a1b9b
1 file changed
+1 -1
+1 -1
View File
@@ -67,7 +67,7 @@ int libxl_ctx_init(libxl_ctx *ctx, int version, xentoollog_logger *lg)
int libxl_ctx_free(libxl_ctx *ctx)
{
xc_interface_close(ctx->xch);
if (ctx->xch) xc_interface_close(ctx->xch);
libxl_version_info_destroy(&ctx->version_info);
if (ctx->xsh) xs_daemon_close(ctx->xsh);
return 0;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.