[lxc-devel] [PATCH] free getline allocated line variable to make valgrind happy
Serge Hallyn
serge.hallyn at ubuntu.com
Mon Oct 28 20:07:54 UTC 2013
Quoting S.Çağlar Onur (caglar at 10ur.org):
> Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
> ---
> src/lxc/lxccontainer.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
> index 1600276..f2f7240 100644
> --- a/src/lxc/lxccontainer.c
> +++ b/src/lxc/lxccontainer.c
> @@ -3129,6 +3129,9 @@ int list_active_containers(const char *lxcpath, char ***names, struct lxc_contai
> if (names)
> *names = unique_names;
>
> + if (line)
> + free(line);
> +
> process_lock();
> fclose(f);
> process_unlock();
> @@ -3145,6 +3148,9 @@ free_bad:
> lxc_container_put((*cret)[i]);
> free(*cret);
> }
> + if (line)
> + free(line);
> +
> process_lock();
> fclose(f);
> process_unlock();
> --
> 1.8.3.2
>
>
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel
More information about the lxc-devel
mailing list