Changeset 459 for trunk


Ignore:
Timestamp:
Aug 7, 2014, 9:15:02 PM (10 years ago)
Author:
katerina
Message:

Fix for ticket #360 (free on null pointer).

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r454 r459  
    16461646                mydebugit="yes"
    16471647        elif test "x${enable_debug}" = "xgdb"; then
     1648                AC_DEFINE(SH_ABORT_ON_ERROR, 1, [Use abort])
    16481649                if test "x${myneedg3}" = "xyes"; then
    16491650                        mydebugdef="-g3"
  • trunk/docs/Changelog

    r458 r459  
    1212        * Fixed incorrect logic in setting the ALLIGNORE flag (more specific
    1313          directory / file directives were ignored)
    14         * Fix for tickets #358 (repetitive lstat warning about deleted 
     14        * Fix for tickets #358 (repetitive lstat warning about deleted
    1515          directory) and #359 (reporting of deleted/added top level directory)
     16        * Fix a free() on NULL (harmless but avoids spurious warning)
    1617
    17183.1.1 (01-0-2014):
  • trunk/include/samhain.h

    r458 r459  
    414414 **************************************************/
    415415
     416#if defined(SH_ABORT_ON_ERROR)
     417#define SH_ABORT abort()
     418#else
     419#define SH_ABORT
     420#endif
     421
    416422#if defined(__GNUC__) && (__GNUC__ >= 4)
    417423#define SH_GNUC_SENTINEL __attribute__((__sentinel__))
  • trunk/src/sh_err_log.c

    r410 r459  
    598598        (*service_failure) = 1;
    599599      }
    600       SH_FREE(tmp);
     600      if (tmp)
     601        SH_FREE(tmp);
    601602      SL_RETURN(-1, _("sh_log_open"));
    602603    }
  • trunk/src/sh_mem.c

    r454 r459  
    444444    {
    445445      sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_E_MNULL);
     446      SH_ABORT;
    446447    }
    447448  SL_RET0(_("sh_mem_free"));
     
    466467      /* use _exit() rather than exit() - we malloc() in atexit() 
    467468       */
     469      SH_ABORT;
    468470      _exit (EXIT_FAILURE);
    469471    }
Note: See TracChangeset for help on using the changeset viewer.