Skip to content

Commit

Permalink
Don't leak extra /dev/null fd (thanks to Julien Cristau)
Browse files Browse the repository at this point in the history
  • Loading branch information
keithw committed Dec 13, 2012
1 parent 3ea9cad commit 1fe6799
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/frontend/mosh-server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,11 @@ int run_server( const char *desired_ip, const char *desired_port,
perror( "dup2" );
exit( 1 );
}

if ( close( nullfd ) < 0 ) {
perror( "close" );
exit( 1 );
}
}

char utmp_entry[ 64 ] = { 0 };
Expand Down

0 comments on commit 1fe6799

Please sign in to comment.