mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 23:37:42 +00:00
rpc: avoid null deref
Detected by Coverity. * src/rpc/virnetserverclient.c (virNetServerClientDispatchRead): Avoid null deref on OOM.
This commit is contained in:
parent
44ebb18ec2
commit
8d0be8fd57
@ -786,10 +786,11 @@ readmore:
|
|||||||
if (client->nrequests < client->nrequests_max) {
|
if (client->nrequests < client->nrequests_max) {
|
||||||
if (!(client->rx = virNetMessageNew())) {
|
if (!(client->rx = virNetMessageNew())) {
|
||||||
client->wantClose = true;
|
client->wantClose = true;
|
||||||
}
|
} else {
|
||||||
client->rx->bufferLength = VIR_NET_MESSAGE_LEN_MAX;
|
client->rx->bufferLength = VIR_NET_MESSAGE_LEN_MAX;
|
||||||
client->nrequests++;
|
client->nrequests++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
virNetServerClientUpdateEvent(client);
|
virNetServerClientUpdateEvent(client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user