1
0
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:
Eric Blake 2010-11-30 08:35:22 -07:00
parent 9c65609247
commit 6d0df64821

View File

@ -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;