Commit 10eaabd1 authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov

namespaces: zero struct ns_id when allocating

Later (find_ext_ns_id, but probably others as well) we depend on the struct
being zeroed in order to figure out whether or not to collect info about
it. Let's make sure it is actually zeroed.
Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 89d75796
......@@ -259,7 +259,7 @@ static unsigned int generate_ns_id(int pid, unsigned int kid, struct ns_desc *nd
} else
type = NS_CRIU;
nsid = xmalloc(sizeof(*nsid));
nsid = xzalloc(sizeof(*nsid));
if (!nsid)
return 0;
......
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