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