mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-02 15:25:21 +00:00
service: don't leak a zero file descriptor
CID 1141017 (#1-2 of 2): Resource leak (RESOURCE_LEAK) 14. leaked_handle: Handle variable fd 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:
committed by
Pavel Emelyanov
parent
99bb419df1
commit
a5bb33417b
@@ -211,7 +211,7 @@ static int send_req_and_recv_resp(CriuReq *req, CriuResp **resp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
if (fd > 0)
|
if (fd >= 0)
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
return -ret;
|
return -ret;
|
||||||
|
Reference in New Issue
Block a user