[lxc-devel] [PATCH 1/1] log_path: free on lxc_conf free (for master)

Stéphane Graber stgraber at ubuntu.com
Fri Aug 8 18:34:34 UTC 2014


On Fri, Aug 08, 2014 at 06:27:24PM +0000, Serge Hallyn wrote:
> This is for the master branch, to fix a memleak on conf free.
> 
> Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>

Acked-by: Stéphane Graber <stgraber at ubuntu.com>

> ---
>  src/lxc/conf.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/lxc/conf.c b/src/lxc/conf.c
> index 237bad4..531a588 100644
> --- a/src/lxc/conf.c
> +++ b/src/lxc/conf.c
> @@ -4482,6 +4482,8 @@ void lxc_conf_free(struct lxc_conf *conf)
>  {
>  	if (!conf)
>  		return;
> +	if (conf->console.log_path)
> +		free(conf->console.log_path);
>  	if (conf->console.path)
>  		free(conf->console.path);
>  	if (conf->rootfs.mount)
> -- 
> 2.1.0.rc1
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140808/0ae7fc4a/attachment.sig>


More information about the lxc-devel mailing list