]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
free getline allocated line variable to make valgrind happy
authorS.Çağlar Onur <caglar@10ur.org>
Mon, 28 Oct 2013 19:39:12 +0000 (15:39 -0400)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 28 Oct 2013 20:08:17 +0000 (15:08 -0500)
Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxccontainer.c

index 1600276530be261450fdcc178b3461bf2df37a66..f2f7240fc81cee5467345c5a14a76397de6e04c4 100644 (file)
@@ -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();