mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
libvirtd: avoid a NULL dereference on error path
* daemon/libvirtd.c (qemudDispatchServer): Since "client" may be NULL in the "cleanup:" block, free client->rx only when it's not.
This commit is contained in:
parent
52a18abd94
commit
63a499d3f3
@ -1422,7 +1422,8 @@ static int qemudDispatchServer(struct qemud_server *server, struct qemud_socket
|
||||
if (client &&
|
||||
client->tlssession) gnutls_deinit (client->tlssession);
|
||||
close (fd);
|
||||
VIR_FREE(client->rx);
|
||||
if (client)
|
||||
VIR_FREE(client->rx);
|
||||
VIR_FREE(client);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user