mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 09:58:09 +00:00
tunfile_open(): don't leak fd on error path
Reported by Coverity, CID 51640. Signed-off-by: Kir Kolyshkin <kir@openvz.org> Acked-by: Andrew Vagin <avagin@odin.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
4f9e509c15
commit
2b8f61393e
2
tun.c
2
tun.c
@ -342,7 +342,7 @@ static int tunfile_open(struct file_desc *d)
|
|||||||
tl = find_tun_link(ti->tfe->netdev);
|
tl = find_tun_link(ti->tfe->netdev);
|
||||||
if (!tl) {
|
if (!tl) {
|
||||||
pr_err("No tun device for file %s\n", ti->tfe->netdev);
|
pr_err("No tun device for file %s\n", ti->tfe->netdev);
|
||||||
return -1;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(&ifr, 0, sizeof(ifr));
|
memset(&ifr, 0, sizeof(ifr));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user