Index: /trunk/configure.ac
===================================================================
--- /trunk/configure.ac	(revision 508)
+++ /trunk/configure.ac	(revision 509)
@@ -12,5 +12,5 @@
 dnl start
 dnl
-AM_INIT_AUTOMAKE(samhain, 4.1.4)
+AM_INIT_AUTOMAKE(samhain, 4.1.5)
 AC_DEFINE([SAMHAIN], 1, [Application is samhain])
 AC_CANONICAL_HOST
Index: /trunk/docs/Changelog
===================================================================
--- /trunk/docs/Changelog	(revision 508)
+++ /trunk/docs/Changelog	(revision 509)
@@ -1,3 +1,6 @@
-4.1.4:
+4.1.5:
+	* fix memory leak in server (reported by C. Doerr).
+
+4.1.4 (02-06-2016):
 	* fix problems with wildcard pattern re-evaluation (reported by
 	A. Ansari):
Index: /trunk/src/sh_calls.c
===================================================================
--- /trunk/src/sh_calls.c	(revision 508)
+++ /trunk/src/sh_calls.c	(revision 509)
@@ -737,4 +737,5 @@
   if ((val_return < 0) && (*o_noatime != 0))
     {
+      /* cppcheck-suppress resourceLeak */
       val_return = open (pathname, flags, mode);
       if (val_return >= 0)
Index: /trunk/src/sh_ipvx.c
===================================================================
--- /trunk/src/sh_ipvx.c	(revision 508)
+++ /trunk/src/sh_ipvx.c	(revision 509)
@@ -302,4 +302,5 @@
       break;
     }
+  freeaddrinfo(res);
   return 1;
 #else
@@ -382,4 +383,6 @@
   if (err == 0)
     {
+      struct addrinfo * res_orig = res;
+
 #if defined(AI_CANONNAME)
       if (res->ai_canonname && strlen(res->ai_canonname) > 0)
@@ -413,4 +416,6 @@
 	  res = res->ai_next;
 	}
+      
+      freeaddrinfo(res_orig);
     }
 #else
Index: /trunk/test/testcompile.sh
===================================================================
--- /trunk/test/testcompile.sh	(revision 508)
+++ /trunk/test/testcompile.sh	(revision 509)
@@ -94,7 +94,7 @@
     #
     cd src/
-    stat=`cppcheck --quiet --inline-suppr --force -j 4 --template="{file},{line},{severity},{id},{message}" -I. -I.. -I../include sh_*.c samhain.c slib.c dnmalloc.c zAVLTree.c trustfile.c rijndael-*.c bignum.c 2>&1 | wc -l`
+    stat=`cppcheck --quiet --library=posix.cfg --inline-suppr --force -j 4 --template="{file},{line},{severity},{id},{message}" -I. -I.. -I../include sh_*.c samhain.c slib.c dnmalloc.c zAVLTree.c trustfile.c rijndael-*.c bignum.c 2>&1 | wc -l`
     if [ $stat -ne 0 ]; then
-	cppcheck --quiet --inline-suppr --force -j 4 --template="{file},{line},{severity},{id},{message}" -I. -I.. -I../include sh_*.c samhain.c slib.c dnmalloc.c zAVLTree.c trustfile.c rijndael-*.c bignum.c >>../test_log 2>&1
+	cppcheck --quiet --library=posix.cfg --inline-suppr --force -j 4 --template="{file},{line},{severity},{id},{message}" -I. -I.. -I../include sh_*.c samhain.c slib.c dnmalloc.c zAVLTree.c trustfile.c rijndael-*.c bignum.c >>../test_log 2>&1
 	retval=1
 	[ -z "$quiet" ] && log_fail $2 ${MAXTEST} "check w/cppcheck";
