Commit 3158ab5b by Tycho Andersen Committed by Serge Hallyn

c/r: use fclose instead of close

We're leaking the FILE* here while closing the underlying fd; let's just close the file and thus close both. Reported-by: Coverity Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com> Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent 2a5da243
...@@ -279,11 +279,11 @@ static bool criu_version_ok() ...@@ -279,11 +279,11 @@ static bool criu_version_ok()
goto version_error; goto version_error;
version_match: version_match:
close(pipes[0]); fclose(f);
return true; return true;
version_error: version_error:
close(pipes[0]); fclose(f);
ERROR("must have criu " CRIU_VERSION " or greater to checkpoint/restore\n"); ERROR("must have criu " CRIU_VERSION " or greater to checkpoint/restore\n");
return false; return false;
} }
......
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