mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 13:28:27 +00:00
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: Andrew Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
290e238d01
commit
034bfe16c9
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user