File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -486,6 +486,7 @@ int read_config(const char *path, int type)
486486 booth_conf = malloc (sizeof (struct booth_config )
487487 + TICKET_ALLOC * sizeof (struct ticket_config ));
488488 if (!booth_conf ) {
489+ fclose (fp );
489490 log_error ("failed to alloc memory for booth config" );
490491 return - ENOMEM ;
491492 }
@@ -788,6 +789,7 @@ int read_config(const char *path, int type)
788789 error = "Unknown keyword" ;
789790 goto err ;
790791 }
792+ fclose (fp );
791793
792794 if ((booth_conf -> site_count % 2 ) == 0 ) {
793795 log_warn ("Odd number of nodes is strongly recommended!" );
@@ -820,6 +822,7 @@ int read_config(const char *path, int type)
820822
821823
822824err :
825+ fclose (fp );
823826out :
824827 log_error ("%s in config file line %d" ,
825828 error , lineno );
You can’t perform that action at this time.
0 commit comments