mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-22 09:39:13 +00:00
cg: Fix use-after-free in put_ctls
Since we're freeing list entries don't forget to initialize list then, otherwise it gets out with free entries and may hit use-after-free bug. Signed-off-by: Cyrill Gorcunov <gorcunov@virtuozzo.com> Acked-by: Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
c553fe04f4
commit
94bfda900e
1 changed files with 1 additions and 0 deletions
|
|
@ -2302,6 +2302,7 @@ void put_ctls(struct list_head *l)
|
|||
xfree(c->path);
|
||||
xfree(c);
|
||||
}
|
||||
INIT_LIST_HEAD(l);
|
||||
}
|
||||
|
||||
/* Parse and create all the real controllers. This does not include things with
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue