free getline allocated line variable to make valgrind happy

Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
S.Çağlar Onur 2013-10-28 15:39:12 -04:00 committed by Serge Hallyn
parent 527dacf6e5
commit e853a32df1

View 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();