From: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx> If we fail to get domain, we had to judge whether it's null or not when doing 'cleanup'. Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx> --- daemon/remote.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/remote.c b/daemon/remote.c index f3de6a0..decaecc 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -4643,7 +4643,8 @@ lxcDispatchDomainOpenNamespace(virNetServerPtr server ATTRIBUTE_UNUSED, cleanup: if (rv < 0) virNetMessageSaveError(rerr); - virDomainFree(dom); + if (dom) + virDomainFree(dom); return rv; } -- 1.8.2.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list