mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
tests: Don't call virNetServerClientClose without valid client
If @client hasn't been opened, then don't call virNetServerClientClose since that'll cause certain failure. Found by Coverity Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
@@ -152,7 +152,8 @@ static int testIdentity(const void *opaque ATTRIBUTE_UNUSED)
|
||||
ret = 0;
|
||||
cleanup:
|
||||
virObjectUnref(sock);
|
||||
virNetServerClientClose(client);
|
||||
if (!client)
|
||||
virNetServerClientClose(client);
|
||||
virObjectUnref(client);
|
||||
virObjectUnref(ident);
|
||||
VIR_FORCE_CLOSE(sv[0]);
|
||||
|
||||
Reference in New Issue
Block a user