2010/11/30 Eric Blake <eblake@xxxxxxxxxx>: > * daemon/libvirtd.c (qemudRunLoop): Free any remaining client data. > --- > > Since qemudCleanup calls VIR_FREE(server), it only makes sense to > first free all of server's contents. > > Probably not the most important leak to plug (it only triggers at > libvirtd exit, where the memory would be abandoned by process exit > anyways, and does not affect clients that link against libvirt as > a library), but plugging it makes leak analysis of the rest of > libvirtd easier. > > Âdaemon/libvirtd.c | Â Â4 ++++ > Â1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c > index caf51bf..791b3dc 100644 > --- a/daemon/libvirtd.c > +++ b/daemon/libvirtd.c > @@ -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; > -- > 1.7.3.2 > ACK. Matthias -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list