mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 03:21:44 +03:00
libvirtd: avoid memory leak on shutdown
* daemon/libvirtd.c (qemudRunLoop): Free any remaining client data.
This commit is contained in:
parent
9c65609247
commit
6d0df64821
@ -2403,6 +2403,10 @@ cleanup:
|
||||
server->workers[i].hasThread = 0;
|
||||
}
|
||||
VIR_FREE(server->workers);
|
||||
for (i = 0; i < server->nclients; i++)
|
||||
qemudFreeClient(server->clients[i]);
|
||||
server->nclients = 0;
|
||||
VIR_SHRINK_N(server->clients, server->nclients_max, server->nclients_max);
|
||||
|
||||
virMutexUnlock(&server->lock);
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user