mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-03 07:23:23 +00:00
fix getline(3) memory leaks
Signed-off-by: Dwight Engen <dwight.engen@oracle.com> Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
fca3080f6a
commit
20fe4e8feb
@ -114,6 +114,7 @@ struct lxc_proc_context_info *lxc_proc_get_context_info(pid_t pid)
|
||||
}
|
||||
}
|
||||
|
||||
free(line);
|
||||
fclose(proc_file);
|
||||
|
||||
if (!found) {
|
||||
@ -145,7 +146,6 @@ struct lxc_proc_context_info *lxc_proc_get_context_info(pid_t pid)
|
||||
|
||||
out_error:
|
||||
free(info);
|
||||
free(line);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -503,6 +503,7 @@ static char *get_all_cgroups(void)
|
||||
}
|
||||
|
||||
out:
|
||||
free(line);
|
||||
fclose(f);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user