[CRIU] [PATCH 4/5] tunfile_open(): don't leak fd on error path
Kir Kolyshkin
kir at openvz.org
Tue May 5 15:31:11 PDT 2015
Reported by Coverity, CID 51640.
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
tun.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tun.c b/tun.c
index e4c9bb6..aeca62b 100644
--- a/tun.c
+++ b/tun.c
@@ -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));
--
1.9.3
More information about the CRIU
mailing list