Permalink
Browse files

Don't leak an fd in check_yama_ptrace_scope.

  • Loading branch information...
1 parent 542a381 commit ce2f3ebf00a7af15766dcd1c52f6fc971a8827b4 @nelhage committed Jan 22, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 reptyr.c
View
1 reptyr.c
@@ -130,6 +130,7 @@ void check_yama_ptrace_scope(void) {
char buf[256];
int n;
n = read(fd, buf, sizeof buf);
+ close(fd);
if (n > 0) {
if (!atoi(buf)) {
return;

0 comments on commit ce2f3eb

Please sign in to comment.