mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 06:25:19 +00: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;
|
server->workers[i].hasThread = 0;
|
||||||
}
|
}
|
||||||
VIR_FREE(server->workers);
|
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);
|
virMutexUnlock(&server->lock);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user