Index: trunk/src/sh_err_log.c
===================================================================
--- trunk/src/sh_err_log.c	(revision 458)
+++ trunk/src/sh_err_log.c	(revision 459)
@@ -598,5 +598,6 @@
         (*service_failure) = 1;
       }
-      SH_FREE(tmp);
+      if (tmp)
+	SH_FREE(tmp);
       SL_RETURN(-1, _("sh_log_open"));
     }
Index: trunk/src/sh_mem.c
===================================================================
--- trunk/src/sh_mem.c	(revision 458)
+++ trunk/src/sh_mem.c	(revision 459)
@@ -444,4 +444,5 @@
     {
       sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_E_MNULL);
+      SH_ABORT;
     }
   SL_RET0(_("sh_mem_free"));
@@ -466,4 +467,5 @@
       /* use _exit() rather than exit() - we malloc() in atexit()  
        */
+      SH_ABORT;
       _exit (EXIT_FAILURE);
     }
