提交 6df5d777 编写于 作者: J John Ferlan

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: NJohn Ferlan <jferlan@redhat.com>
上级 713342e9
......@@ -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]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册