Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
#define BUFFER_H
#include "basic.h"
+#include "error.h"
#define BUF_SIZE_MAX 1000000
* Allocate memory to hold a structure
*/
-void out_of_memory (void);
-
#define ALLOC_OBJ(dptr, type) \
{ \
check_malloc_return ((dptr) = (type *) malloc (sizeof (type))); \
static inline void
check_malloc_return (void *p)
{
- void out_of_memory (void);
if (!p)
out_of_memory ();
}
/* exit program */
void openvpn_exit (const int status);
+/* exit program on out of memory error */
+void out_of_memory (void);
+
/*
* Check the return status of read/write routines.
*/