Re: [PATCH 7/n] qemu: plug memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/11/30 Eric Blake <eblake@xxxxxxxxxx>:
> * src/qemu/qemu_driver.c (qemudShutdown): Free all strings and the
> ebtables structure.
> * src/libvirt_private.syms (ebtablesContextFree): Export missing
> symbol.
> * src/util/ebtables.c (ebtablesContextFree): Allow early exit.
> ---
>
> This leak triggers on every start/stop of a qemu domain, although
> it typically accounts for less than 1k leak per sequence.
>

> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index f00d8a3..faab42a 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -2068,10 +2068,9 @@ qemudShutdown(void) {
>
> Â Â virSysinfoDefFree(qemu_driver->hostsysinfo);
>
> - Â ÂVIR_FREE(qemu_driver->securityDriverName);
> - Â ÂVIR_FREE(qemu_driver->logDir);
> Â Â VIR_FREE(qemu_driver->configDir);
> Â Â VIR_FREE(qemu_driver->autostartDir);
> + Â ÂVIR_FREE(qemu_driver->logDir);
> Â Â VIR_FREE(qemu_driver->stateDir);
> Â Â VIR_FREE(qemu_driver->libDir);
> Â Â VIR_FREE(qemu_driver->cacheDir);
> @@ -2081,10 +2080,18 @@ qemudShutdown(void) {
> Â Â VIR_FREE(qemu_driver->vncListen);
> Â Â VIR_FREE(qemu_driver->vncPassword);
> Â Â VIR_FREE(qemu_driver->vncSASLdir);
> - Â ÂVIR_FREE(qemu_driver->saveImageFormat);
> + Â ÂVIR_FREE(qemu_driver->spiceTLSx509certdir);
> + Â ÂVIR_FREE(qemu_driver->spiceListen);
> + Â ÂVIR_FREE(qemu_driver->spicePassword);
> Â Â VIR_FREE(qemu_driver->hugetlbfs_mount);
> Â Â VIR_FREE(qemu_driver->hugepage_path);
>
> + Â ÂVIR_FREE(qemu_driver->securityDriverName);

Any specific reason for this empty line in this block of free calls?

> + Â ÂVIR_FREE(qemu_driver->saveImageFormat);
> + Â ÂVIR_FREE(qemu_driver->dumpImageFormat);
> +
> + Â ÂebtablesContextFree(qemu_driver->ebtables);
> +
> Â Â if (qemu_driver->cgroupDeviceACL) {
> Â Â Â Â for (i = 0 ; qemu_driver->cgroupDeviceACL[i] != NULL ; i++)
> Â Â Â Â Â Â VIR_FREE(qemu_driver->cgroupDeviceACL[i]);

ACK.

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]