memory bug corrected
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#ifndef _ERR_HANDLING_H_
|
||||
#define _ERR_HANDLING_H_
|
||||
|
||||
#ifdef FORTIFY
|
||||
#include "fortify.h"
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <sys/errno.h>
|
||||
|
||||
@@ -71,6 +74,8 @@ Global Variables (read only)
|
||||
#define ERR_MSG(R) { ErrMsg(R); goto OnError; }
|
||||
#define ERR_COD(R) { ErrCod(R); goto OnError; }
|
||||
|
||||
#define NEW(PTR) ERR_SP(PTR=my_malloc(sizeof(*PTR),#PTR))
|
||||
|
||||
void ErrTxt(char *text, int systemError);
|
||||
void ErrMsg(char *msg);
|
||||
void ErrCod(int code);
|
||||
@@ -79,6 +84,8 @@ void ERR_EXIT(char *text);
|
||||
void ErrLog(char *text);
|
||||
void ErrSetOutRtn(void (*rtn)(), void *arg);
|
||||
void ErrSetOutFile(FILE *file);
|
||||
void *my_malloc(size_t size, const char *text);
|
||||
void my_free(void *ptr);
|
||||
|
||||
extern int ErrCode;
|
||||
extern char *ErrMessage;
|
||||
|
||||
Reference in New Issue
Block a user