Skip to content

Commit

Permalink
ct: don't close a file descriptor if it's equal to the required one
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Vagin <[email protected]>
  • Loading branch information
avagin committed Nov 19, 2014
1 parent 8b91880 commit 574b322
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ct.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@ static int ct_execv(void *a)
goto err;
}
for (i = 0; i < 3; i++)
close(ea->fds[i]);
if (ea->fds[i] != i)
close(ea->fds[i]);
}

sigfillset(&mask);
Expand Down

0 comments on commit 574b322

Please sign in to comment.