Commit 06d8c36c authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

socket: handle errors of xmalloc

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 9db8df3d
......@@ -121,6 +121,8 @@ static int dump_bound_dev(int sk, SkOptsEntry *soe)
pr_debug("\tDumping %s bound dev for sk\n", dev);
soe->so_bound_dev = xmalloc(len);
if (soe->so_bound_dev == NULL)
return -1;
strcpy(soe->so_bound_dev, dev);
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