Commit 2cdafc54 by Serge Hallyn

fix up a few snafu's in forward-port of last commit

Make sure to free line. Don't free 'info' when freeing base_info will later free info. Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent 178938fe
...@@ -400,6 +400,7 @@ out: ...@@ -400,6 +400,7 @@ out:
fclose(proc_self_mountinfo); fclose(proc_self_mountinfo);
process_unlock(); process_unlock();
free(tokens); free(tokens);
free(line);
return bret; return bret;
} }
...@@ -1123,7 +1124,6 @@ char *lxc_cgroup_get_hierarchy_abs_path(const char *subsystem, const char *name, ...@@ -1123,7 +1124,6 @@ char *lxc_cgroup_get_hierarchy_abs_path(const char *subsystem, const char *name,
} }
result = cgroup_to_absolute_path(mp, info->cgroup_path, NULL); result = cgroup_to_absolute_path(mp, info->cgroup_path, NULL);
out3: out3:
lxc_cgroup_process_info_free(info);
out2: out2:
lxc_cgroup_process_info_free(base_info); lxc_cgroup_process_info_free(base_info);
out1: out1:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment