Permalink
Browse files

sconf.c: fix possible memleak

  • Loading branch information...
1 parent 1df261e commit 2df8f29306ea5d9d96f9c7a2313ae04cbdd1f54c @jsynacek committed May 24, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 xinetd/sconf.c
View
@@ -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 ) ;

0 comments on commit 2df8f29

Please sign in to comment.