---
src/rpc/virnetclient.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c
index dfc4ed9..c100ef1 100644
--- a/src/rpc/virnetclient.c
+++ b/src/rpc/virnetclient.c
@@ -271,6 +271,9 @@ void virNetClientFree(virNetClientPtr client)
void virNetClientClose(virNetClientPtr client)
{
+ if (!client)
+ return;
+
virNetClientLock(client);
virNetSocketRemoveIOCallback(client->sock);
virNetSocketFree(client->sock);
--
1.7.1