Skip to content

Commit

Permalink
sconf.c: fix possible memleak
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Synacek committed May 24, 2012
1 parent 1df261e commit 2df8f29
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xinetd/sconf.c
Expand Up @@ -153,6 +153,11 @@ struct service_config *sc_make_special( const char *service_name,
if ( SC_ID(scp) == NULL )
{
out_of_memory( func ) ;
/*
* Since we're returning instead of exiting, it's probably a good idea to
* free scp
*/
sc_free( scp );
return( NULL ) ;
}
SC_SPECIFY( scp, A_ID ) ;
Expand Down

0 comments on commit 2df8f29

Please sign in to comment.