mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00: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:
parent
713342e953
commit
6df5d77723
@ -152,6 +152,7 @@ static int testIdentity(const void *opaque ATTRIBUTE_UNUSED)
|
||||
ret = 0;
|
||||
cleanup:
|
||||
virObjectUnref(sock);
|
||||
if (!client)
|
||||
virNetServerClientClose(client);
|
||||
virObjectUnref(client);
|
||||
virObjectUnref(ident);
|
||||
|
Loading…
Reference in New Issue
Block a user