Changeset 509 for trunk


Ignore:
Timestamp:
Aug 9, 2016, 8:06:45 PM (8 years ago)
Author:
katerina
Message:

Fix for ticket #402 (memory leak in server).

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r507 r509  
    1212dnl start
    1313dnl
    14 AM_INIT_AUTOMAKE(samhain, 4.1.4)
     14AM_INIT_AUTOMAKE(samhain, 4.1.5)
    1515AC_DEFINE([SAMHAIN], 1, [Application is samhain])
    1616AC_CANONICAL_HOST
  • trunk/docs/Changelog

    r507 r509  
    1 4.1.4:
     14.1.5:
     2        * fix memory leak in server (reported by C. Doerr).
     3
     44.1.4 (02-06-2016):
    25        * fix problems with wildcard pattern re-evaluation (reported by
    36        A. Ansari):
  • trunk/src/sh_calls.c

    r503 r509  
    737737  if ((val_return < 0) && (*o_noatime != 0))
    738738    {
     739      /* cppcheck-suppress resourceLeak */
    739740      val_return = open (pathname, flags, mode);
    740741      if (val_return >= 0)
  • trunk/src/sh_ipvx.c

    r481 r509  
    302302      break;
    303303    }
     304  freeaddrinfo(res);
    304305  return 1;
    305306#else
     
    382383  if (err == 0)
    383384    {
     385      struct addrinfo * res_orig = res;
     386
    384387#if defined(AI_CANONNAME)
    385388      if (res->ai_canonname && strlen(res->ai_canonname) > 0)
     
    413416          res = res->ai_next;
    414417        }
     418     
     419      freeaddrinfo(res_orig);
    415420    }
    416421#else
  • trunk/test/testcompile.sh

    r481 r509  
    9494    #
    9595    cd src/
    96     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`
     96    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`
    9797    if [ $stat -ne 0 ]; then
    98         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
     98        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
    9999        retval=1
    100100        [ -z "$quiet" ] && log_fail $2 ${MAXTEST} "check w/cppcheck";
Note: See TracChangeset for help on using the changeset viewer.