mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
admin: Be consistent when resetting errors
Resetting an error should be the first thing public API does. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
724d5340bd
commit
335bc13cc1
@ -371,11 +371,12 @@ virAdmConnectIsAlive(virAdmConnectPtr conn)
|
||||
|
||||
VIR_DEBUG("conn=%p", conn);
|
||||
|
||||
virResetLastError();
|
||||
|
||||
if (!conn)
|
||||
return 0;
|
||||
|
||||
virCheckAdmConnectReturn(conn, -1);
|
||||
virResetLastError();
|
||||
|
||||
priv = conn->privateData;
|
||||
virObjectLock(priv);
|
||||
|
Loading…
x
Reference in New Issue
Block a user