2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

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: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2014-08-07 10:54:00 +04:00
committed by Pavel Emelyanov
parent e44f4e7acd
commit 8311b43517

View File

@@ -1583,7 +1583,7 @@ int parse_task_cgroup(int pid, struct list_head *retl, unsigned int *n)
f = fopen_proc(pid, "cgroup");
while (fgets(buf, BUF_SIZE, f)) {
struct cg_ctl *ncc, *cc;
char *name, *path, *e;
char *name, *path = NULL, *e;
ret = -1;
ncc = xmalloc(sizeof(*cc));