]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Fixed inconsequential memory leaks when sarg terminates early.
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Wed, 14 Oct 2009 13:22:02 +0000 (13:22 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Wed, 14 Oct 2009 13:22:02 +0000 (13:22 +0000)
CMakeLists.txt
ChangeLog
include/info.h
log.c

index fca7c35415f78c50c3fbd5fbd90b9a78e7a3ae2b..5249befaed85e6e1a373dc9aa6ad3886f0433a19 100755 (executable)
@@ -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)
index cba6bf65488c848a355dbab2517f671dd5ff2072..3e07772e608d296e4c170bae4769ebc989c69704 100644 (file)
--- 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
index 1ba848d24d09b7b7b5b59d42f0c552b2ed6a50ef..954d4018e082cfd9b3c5f192c0f1b424c5a94b47 100755 (executable)
@@ -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 a301b281351efb70bed78972c301fd335bb332c0..b997c0965cce335ad3a90f8d6a057674b153a5cf 100644 (file)
--- 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);
    }