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

Re: [libvirt] [PATCH 2/8] Fix a memory leak in the snapshot code in libvirtd.



2010/4/23 Chris Lalancette <clalance redhat com>:
> While running libvirtd under valgrind and doing some
> snapshot testing I noticed that we would always leak a
> connection reference.  The problem was actually that we
> were leaking a domain reference in the libvirtd remote
> snapshot code, which was in turn causing a leaked
> connection reference.  Fix the situation by explicitly
> taking and dropping a domain reference where we need it.
>
> Signed-off-by: Chris Lalancette <clalance redhat com>
> ---
>  daemon/remote.c |  107 +++++++++++++++++++++++++++++++++---------------------
>  1 files changed, 65 insertions(+), 42 deletions(-)
>
> diff --git a/daemon/remote.c b/daemon/remote.c
> index 738799c..bb8c28c 100644
> --- a/daemon/remote.c
> +++ b/daemon/remote.c
> @@ -68,7 +68,7 @@ static virStoragePoolPtr get_nonnull_storage_pool (virConnectPtr conn, remote_no
>  static virStorageVolPtr get_nonnull_storage_vol (virConnectPtr conn, remote_nonnull_storage_vol vol);
>  static virSecretPtr get_nonnull_secret (virConnectPtr conn, remote_nonnull_secret secret);
>  static virNWFilterPtr get_nonnull_nwfilter (virConnectPtr conn, remote_nonnull_nwfilter nwfilter);
> -static virDomainSnapshotPtr get_nonnull_domain_snapshot (virConnectPtr conn, remote_nonnull_domain_snapshot snapshot);
> +static virDomainSnapshotPtr get_nonnull_domain_snapshot (virDomainPtr conn, remote_nonnull_domain_snapshot snapshot);

s/conn/domain/

ACK

Matthias


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