mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-28 20:42:49 +00:00
page-server: don't forget to close a sever socket
CID 73348 (#1 of 1): Resource leak (RESOURCE_LEAK) 19. leaked_handle: Handle variable sk going out of scope leaks the handle. Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
2491da9219
commit
e47eccb188
1 changed files with 2 additions and 1 deletions
|
|
@ -307,8 +307,9 @@ int cr_page_server(bool daemon_mode, int cfd)
|
|||
no_server:
|
||||
if (daemon_mode) {
|
||||
ret = cr_daemon(1, 0, &ask, cfd);
|
||||
close_safe(&sk);
|
||||
if (ret == -1) {
|
||||
pr_perror("Can't run in the background");
|
||||
pr_err("Can't run in the background\n");
|
||||
goto out;
|
||||
}
|
||||
if (ret > 0) { /* parent task, daemon started */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue