mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +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,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]);
|
||||
|
Loading…
Reference in New Issue
Block a user