Resetting an error should be the first thing public API does. Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> --- src/libvirt-admin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libvirt-admin.c b/src/libvirt-admin.c index 44b4d4090e59..add4fcc3576a 100644 --- a/src/libvirt-admin.c +++ b/src/libvirt-admin.c @@ -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); -- 2.7.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list