Commit 2559572a authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

check: don't lead fd

CID 83243 (#1 of 1): Resource leak (RESOURCE_LEAK)
6. leaked_handle: Handle variable fd going out of scope leaks the handle.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 71a0b5dc
...@@ -228,6 +228,7 @@ static int check_fcntl(void) ...@@ -228,6 +228,7 @@ static int check_fcntl(void)
if (fcntl(fd, F_GETOWNER_UIDS, (long)v)) { if (fcntl(fd, F_GETOWNER_UIDS, (long)v)) {
pr_perror("Can'r fetch file owner UIDs"); pr_perror("Can'r fetch file owner UIDs");
close(fd);
return -1; return -1;
} }
......
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