Commit 034bfe16 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

tcp: don't leak a file descriptor

CID 164719 (#1 of 1): Resource leak (RESOURCE_LEAK)
7. leaked_handle: Handle variable sk going out of scope leaks the handle.
Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 290e238d
......@@ -840,6 +840,7 @@ int kerndat_tcp_repair_window()
if (errno == EPERM) {
kdat.has_tcp_window = false;
pr_warn("TCP_REPAIR isn't available to unprivileged users\n");
close(sk);
return 0;
}
pr_perror("Unable to set TCP_REPAIR");
......
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