Commit 94bfda90 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

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: 's avatarCyrill Gorcunov <gorcunov@virtuozzo.com>
Acked-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent c553fe04
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment