[CRIU] [PATCH] proc_parse.c: parse_task_cgroup -- Don't forget to init @path
Cyrill Gorcunov
gorcunov at openvz.org
Wed Aug 6 23:54:07 PDT 2014
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 at openvz.org>
---
proc_parse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/proc_parse.c b/proc_parse.c
index 3bc1e30bbfea..66a1e12c2d74 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -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));
--
1.9.3
More information about the CRIU
mailing list