Commit 8311b435 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

proc_parse.c: parse_task_cgroup -- Don't forget to init @path

proc_parse.c: In function ‘parse_task_cgroup’:
proc_parse.c:1603:16: error: ‘path’ may be used uninitialized in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent e44f4e7a
...@@ -1583,7 +1583,7 @@ int parse_task_cgroup(int pid, struct list_head *retl, unsigned int *n) ...@@ -1583,7 +1583,7 @@ int parse_task_cgroup(int pid, struct list_head *retl, unsigned int *n)
f = fopen_proc(pid, "cgroup"); f = fopen_proc(pid, "cgroup");
while (fgets(buf, BUF_SIZE, f)) { while (fgets(buf, BUF_SIZE, f)) {
struct cg_ctl *ncc, *cc; struct cg_ctl *ncc, *cc;
char *name, *path, *e; char *name, *path = NULL, *e;
ret = -1; ret = -1;
ncc = xmalloc(sizeof(*cc)); ncc = xmalloc(sizeof(*cc));
......
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