From: S.Çağlar Onur Date: Mon, 28 Oct 2013 19:39:12 +0000 (-0400) Subject: free getline allocated line variable to make valgrind happy X-Git-Tag: lxc-1.0.0.alpha3~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e853a32df142fe3cee161e03b00ffb229714fadb;p=thirdparty%2Flxc.git free getline allocated line variable to make valgrind happy Signed-off-by: S.Çağlar Onur Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 160027653..f2f7240fc 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();