From: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
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(a)cn.fujitsu.com>
---
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