mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 11:51:11 +00:00
rpc: fix segmentation fault caused by null client-sock
The client-sock could have been set to NULL by eventloop thread after async event fired.
This commit is contained in:
parent
340196c46f
commit
2b8624dd33
@ -644,7 +644,8 @@ virNetClientMarkClose(virNetClientPtr client,
|
|||||||
int reason)
|
int reason)
|
||||||
{
|
{
|
||||||
VIR_DEBUG("client=%p, reason=%d", client, reason);
|
VIR_DEBUG("client=%p, reason=%d", client, reason);
|
||||||
virNetSocketRemoveIOCallback(client->sock);
|
if (client->sock)
|
||||||
|
virNetSocketRemoveIOCallback(client->sock);
|
||||||
client->wantClose = true;
|
client->wantClose = true;
|
||||||
client->closeReason = reason;
|
client->closeReason = reason;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user