mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
tun: Check for xmalloc error
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
20a835a686
commit
aaeff46e52
1 changed files with 2 additions and 0 deletions
2
tun.c
2
tun.c
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue