mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
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)
|
void virNetClientClose(virNetClientPtr client)
|
||||||
{
|
{
|
||||||
|
if (!client)
|
||||||
|
return;
|
||||||
|
|
||||||
virNetClientLock(client);
|
virNetClientLock(client);
|
||||||
virNetSocketRemoveIOCallback(client->sock);
|
virNetSocketRemoveIOCallback(client->sock);
|
||||||
virNetSocketFree(client->sock);
|
virNetSocketFree(client->sock);
|
||||||
|
Loading…
Reference in New Issue
Block a user