Commit a5bb3341 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

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: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 99bb419d
......@@ -211,7 +211,7 @@ static int send_req_and_recv_resp(CriuReq *req, CriuResp **resp)
}
exit:
if (fd > 0)
if (fd >= 0)
close(fd);
return -ret;
......
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