mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-19 17:43:59 +00:00
criu: pstree_switch_state -- Fix nil deref on error path
We may enter with @root_item = NULL in case of error handling, so simply bail out. Signed-off-by: Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
66ccd9a932
commit
1fc5c0244b
1 changed files with 3 additions and 0 deletions
|
|
@ -463,6 +463,9 @@ void pstree_switch_state(struct pstree_item *root_item, int st)
|
|||
{
|
||||
struct pstree_item *item = root_item;
|
||||
|
||||
if (!root_item)
|
||||
return;
|
||||
|
||||
if (st != TASK_DEAD)
|
||||
freezer_restore_state();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue