[libvirt] PATCH: Fix leak in storage driver

Jim Meyering jim at meyering.net
Fri Jan 30 15:55:40 UTC 2009


"Daniel P. Berrange" <berrange at redhat.com> wrote:
> A recent change to keep the storage pools active upon shutdown, exposed a
> minor flaw in the code which free's a virStoragePoolObj instance. It
> never free's the associated volumes, since it presumed you'd never free
> a pool, which was still active. A bogus assumption, causing  us to leak
> memory upon daemon shutdown, thus annoying valgrind.
>
> Daniel
>
> diff -r 3e95abd6df89 src/storage_conf.c
> --- a/src/storage_conf.c	Fri Jan 30 11:01:10 2009 +0000
> +++ b/src/storage_conf.c	Fri Jan 30 11:01:29 2009 +0000
> @@ -296,6 +296,8 @@ virStoragePoolObjFree(virStoragePoolObjP
>      if (!obj)
>          return;
>
> +    virStoragePoolObjClearVols(obj);
> +

ACK.
This is crying for integration testing...




More information about the libvir-list mailing list