Commit 20fe4e8f by Dwight Engen Committed by Serge Hallyn

fix getline(3) memory leaks

parent fca3080f
......@@ -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;
}
......
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