From e853a32df142fe3cee161e03b00ffb229714fadb Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Mon, 28 Oct 2013 15:39:12 -0400 Subject: [PATCH] free getline allocated line variable to make valgrind happy MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: S.Çağlar Onur Signed-off-by: Serge Hallyn --- src/lxc/lxccontainer.c | 6 ++++++ 1 file changed, 6 insertions(+) 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(); -- 2.47.2