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:
parent
ef2ab8fdc5
commit
23a646f840
@ -588,6 +588,10 @@ int virAdmServerFree(virAdmServerPtr srv)
|
||||
VIR_DEBUG("server=%p", srv);
|
||||
|
||||
virResetLastError();
|
||||
|
||||
if (!srv)
|
||||
return 0;
|
||||
|
||||
virCheckAdmServerReturn(srv, -1);
|
||||
|
||||
virObjectUnref(srv);
|
||||
|
Loading…
Reference in New Issue
Block a user