Don't leak extra /dev/null fd (thanks to Julien Cristau)

This commit is contained in:
Keith Winstein
2012-12-12 19:05:24 -05:00
parent 3ea9cad285
commit 1fe6799092
+5
View File
@@ -413,6 +413,11 @@ int run_server( const char *desired_ip, const char *desired_port,
perror( "dup2" ); perror( "dup2" );
exit( 1 ); exit( 1 );
} }
if ( close( nullfd ) < 0 ) {
perror( "close" );
exit( 1 );
}
} }
char utmp_entry[ 64 ] = { 0 }; char utmp_entry[ 64 ] = { 0 };