1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-11 09:17:52 +03:00

admin: Make virAdmServerFree() handle NULL gracefully

We don't want to end up like with virDomainFree() and other, right?

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2016-03-01 14:56:12 +01:00
parent ef2ab8fdc5
commit 23a646f840

View File

@ -588,6 +588,10 @@ int virAdmServerFree(virAdmServerPtr srv)
VIR_DEBUG("server=%p", srv);
virResetLastError();
if (!srv)
return 0;
virCheckAdmServerReturn(srv, -1);
virObjectUnref(srv);