提交 23a646f8 编写于 作者: M Martin Kletzander

admin: Make virAdmServerFree() handle NULL gracefully

We don't want to end up like with virDomainFree() and other, right?
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 ef2ab8fd
......@@ -588,6 +588,10 @@ int virAdmServerFree(virAdmServerPtr srv)
VIR_DEBUG("server=%p", srv);
virResetLastError();
if (!srv)
return 0;
virCheckAdmServerReturn(srv, -1);
virObjectUnref(srv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册