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

Re: [libvirt] [PATCH] Fix leak build config file path



On 11/29/2011 09:20 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange redhat com>
> 
> * src/libvirt.c: Free user directory path
> ---
>  src/libvirt.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/src/libvirt.c b/src/libvirt.c
> index cdd111c..55ef743 100644
> --- a/src/libvirt.c
> +++ b/src/libvirt.c
> @@ -974,8 +974,11 @@ virConnectConfigFile(void)
>              goto error;
>  
>          if (virAsprintf(&path, "%s/.libvirt/libvirt.conf",
> -                        userdir) < 0)
> +                        userdir) < 0) {
> +            VIR_FREE(userdir);
>              goto no_memory;
> +        }
> +        VIR_FREE(userdir);
>      }

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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