Commit aaeff46e authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

tun: Check for xmalloc error

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 20a835a6
......@@ -121,6 +121,8 @@ static struct tun_link *__dump_tun_link_fd(int fd, char *name, unsigned flags)
struct sock_fprog flt;
tl = xmalloc(sizeof(*tl));
if (!tl)
goto err;
strcpy(tl->name, name);
if (ioctl(fd, TUNGETVNETHDRSZ, &tl->dmp.vnethdr) < 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