Commit 2b8f6139 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

tunfile_open(): don't leak fd on error path

Reported by Coverity, CID 51640.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Acked-by: 's avatarAndrew Vagin <avagin@odin.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 4f9e509c
......@@ -342,7 +342,7 @@ static int tunfile_open(struct file_desc *d)
tl = find_tun_link(ti->tfe->netdev);
if (!tl) {
pr_err("No tun device for file %s\n", ti->tfe->netdev);
return -1;
goto err;
}
memset(&ifr, 0, sizeof(ifr));
......
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