Don't try to close a NULL virNetClientPtr

* src/rpc/virnetclient.c: Skip close attempt if virNetClientPtr
  is NULL
This commit is contained in:
Guannan Ren 2011-07-20 15:20:18 +01:00 committed by Daniel P. Berrange
parent 14800d49cb
commit b14800af14

View File

@ -271,6 +271,9 @@ void virNetClientFree(virNetClientPtr client)
void virNetClientClose(virNetClientPtr client)
{
if (!client)
return;
virNetClientLock(client);
virNetSocketRemoveIOCallback(client->sock);
virNetSocketFree(client->sock);