mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 05:48:05 +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) {
|
if (errno == EPERM) {
|
||||||
kdat.has_tcp_window = false;
|
kdat.has_tcp_window = false;
|
||||||
pr_warn("TCP_REPAIR isn't available to unprivileged users\n");
|
pr_warn("TCP_REPAIR isn't available to unprivileged users\n");
|
||||||
|
close(sk);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pr_perror("Unable to set TCP_REPAIR");
|
pr_perror("Unable to set TCP_REPAIR");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user