mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-03 07:45:17 +00:00
pstree: Return in case of error in parse_threads()
Add missed return on memory allocation fail branch. Found by coverity. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
dfc97293e0
commit
9c336c04ba
@@ -2339,6 +2339,7 @@ int parse_threads(int pid, struct pid ***_t, int *_n)
|
|||||||
while (--nr > 0)
|
while (--nr > 0)
|
||||||
xfree(t[nr-1]);
|
xfree(t[nr-1]);
|
||||||
xfree(t);
|
xfree(t);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
t[nr - 1]->ns[0].virt = -1;
|
t[nr - 1]->ns[0].virt = -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user