/* xmalloc.c */

/* Copyright 1997 by Eberhard Mattes <mattes@azu.informatik.uni-stuttgart.de>
   Donated to the public domain.  No warranty.

   1997-07-22 Initial version */

#include <stdlib.h>
#include <syslog.h>
#include "firewall.h"
#include "libemfw.h"

/* Allocate memory.  Terminate the process on failure. */

void *xmalloc (size_t n)
{
  void *p = malloc (n);
  if (p != NULL)
    return p;
  syslog (LLEV, "Out of memory");
  exit (1);
}
