libxl: events: Assert that libxl_ctx_free is not called from a hook

No-one in their right mind would do this, and if they did everything
would definitely collapse.  Arrange that if this happens, we crash
ASAP.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Tested-by: Ian Campbell <ian.campbell@citrix.com>
Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
Ian Jackson authored and Ian Jackson committed 2014-12-10 13:48:30 +00:00
1 parent d8582553aa
commit f49f9b4114
1 file changed
+2
+2
View File
@@ -148,6 +148,8 @@ int libxl_ctx_free(libxl_ctx *ctx)
{
if (!ctx) return 0;
assert(!ctx->osevent_in_hook);
int i;
GC_INIT(ctx);
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.