mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-06 05:17:59 +00:00
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:
parent
527dacf6e5
commit
e853a32df1
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user