[CRIU] [PATCH 1/3] pstree: Return in case of error in parse_threads()
Kirill Tkhai
ktkhai at virtuozzo.com
Thu May 11 03:45:19 PDT 2017
Add missed return on memory allocation fail branch.
Found by coverity.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
criu/proc_parse.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/criu/proc_parse.c b/criu/proc_parse.c
index 072f65543..041d45124 100644
--- a/criu/proc_parse.c
+++ b/criu/proc_parse.c
@@ -2316,6 +2316,7 @@ int parse_threads(int pid, struct pid ***_t, int *_n)
while (--nr > 0)
xfree(t[nr-1]);
xfree(t);
+ return -1;
}
t[nr - 1]->ns[0].virt = -1;
}
More information about the CRIU
mailing list