mirror of https://gitee.com/openkylin/libvirt.git
Don't try to close a NULL virNetClientPtr
* src/rpc/virnetclient.c: Skip close attempt if virNetClientPtr is NULL
This commit is contained in:
parent
14800d49cb
commit
b14800af14
|
@ -271,6 +271,9 @@ void virNetClientFree(virNetClientPtr client)
|
|||
|
||||
void virNetClientClose(virNetClientPtr client)
|
||||
{
|
||||
if (!client)
|
||||
return;
|
||||
|
||||
virNetClientLock(client);
|
||||
virNetSocketRemoveIOCallback(client->sock);
|
||||
virNetSocketFree(client->sock);
|
||||
|
|
Loading…
Reference in New Issue