Skip to content

Commit

Permalink
kerndat: Argument cannot be negative (NEGATIVE_RETURNS)
Browse files Browse the repository at this point in the history
CID 92720 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS)
 pfd is passed to a parameter that cannot be negative.

CID 92747 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS)
 pfd is passed to a parameter that cannot be negative.

Signed-off-by: Adrian Reber <[email protected]>
  • Loading branch information
adrianreber committed Sep 28, 2020
1 parent 1c11ed3 commit 0a2f704
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion criu/kerndat.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,8 @@ static int kerndat_fdinfo_has_lock(void)

exit_code = 0;
out:
close(pfd);
if (pfd >= 0)
close(pfd);
close(fd);

return exit_code;
Expand Down

0 comments on commit 0a2f704

Please sign in to comment.