From: Frédéric Marchal Date: Wed, 14 Oct 2009 13:22:02 +0000 (+0000) Subject: Fixed inconsequential memory leaks when sarg terminates early. X-Git-Tag: v2_2_6~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d25469677c86d29a563eb2c6ba7b12667e0506c;p=thirdparty%2Fsarg.git Fixed inconsequential memory leaks when sarg terminates early. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index fca7c35..5249bef 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ PROJECT(sarg C) SET(sarg_VERSION 2) SET(sarg_REVISION 2) SET(sarg_BUILD "6rc1") -SET(sarg_BUILDDATE "Oct-13-2009") +SET(sarg_BUILDDATE "Oct-14-2009") INCLUDE(AddFileDependencies) INCLUDE(CheckIncludeFile) diff --git a/ChangeLog b/ChangeLog index cba6bf6..3e07772 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ SARG ChangeLog -Sep-24-2009 Version 2.2.6rc1 +Oct-14-2009 Version 2.2.6rc1 - Protection against buffer overflows in getword and friends and report the origin of the error instead of always blaming access.log. - Patch #2224623 applied. - Updated to autoconf 2.61. @@ -68,6 +68,7 @@ Sep-24-2009 Version 2.2.6rc1 - Removed missplaced off_t as suggested in bug #2864425. - Z files are uncompressed by zcat to avoid deleting the original log file. - Compressed log files are uncompressed in /tmp/sarg to delete the file when the process completes. + - Fixed several memory leaks. Mar-03-2008 Version 2.2.5 - new fix to the script insertion vulnerability via user-agent diff --git a/include/info.h b/include/info.h index 1ba848d..954d401 100755 --- a/include/info.h +++ b/include/info.h @@ -1,3 +1,3 @@ -#define VERSION PACKAGE_VERSION" Oct-13-2009" +#define VERSION PACKAGE_VERSION" Oct-14-2009" #define PGM PACKAGE_NAME #define URL "http://sarg.sourceforge.net" diff --git a/log.c b/log.c index a301b28..b997c09 100644 --- a/log.c +++ b/log.c @@ -1452,6 +1452,13 @@ int main(int argc,char *argv[]) fclose(fp_denied); if(fp_authfail) fclose(fp_authfail); + free_excludecodes(); + if(userfile) + free(userfile); + if(excludefile) + free(excludefile); + if(excludeuser) + free(excludeuser); unlink(tmp4); unlink(tmp6); unlink(tmp3); @@ -1467,6 +1474,13 @@ int main(int argc,char *argv[]) fclose(fp_denied); if(fp_authfail) fclose(fp_authfail); + free_excludecodes(); + if(userfile) + free(userfile); + if(excludefile) + free(excludefile); + if(excludeuser) + free(excludeuser); exit(0); }