Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwsetup-ng.git;a=commitdiff;h=7ca915716aa2eefa01fdb2d26961a3f1bbfadb47
commit 7ca915716aa2eefa01fdb2d26961a3f1bbfadb47 Author: James Buren <[email protected]> Date: Thu Sep 6 05:32:15 2012 -0500 fix a small memory leak in main function diff --git a/src/main.c b/src/main.c index 0c2908c..4cf11af 100644 --- a/src/main.c +++ b/src/main.c @@ -4,6 +4,8 @@ FILE *logfile = 0; extern int main(int argc,char **argv) { + int code = EXIT_SUCCESS; + logfile = fopen("fwsetup.log","w"); if(logfile == 0) @@ -15,7 +17,13 @@ extern int main(int argc,char **argv) setbuf(logfile,0); - return ui_main(argc,argv); + code = ui_main(argc,argv); + + fclose(logfile); + + logfile = 0; + + return code; } struct global g = _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
