X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=conffile.y;h=9f32cfdaf5c6ba53d4f37397449043351b97dc51;hb=4a6ee8b677fd7addc97fc0d245f95ddde3b5f8e4;hp=1a8ef364a215567579bbf5fb230d0bf75b5ce0fd;hpb=fe5e9cc422cd72526ccfceffbc7e5af8ac83b407;p=secnet.git diff --git a/conffile.y b/conffile.y index 1a8ef36..9f32cfd 100644 --- a/conffile.y +++ b/conffile.y @@ -8,8 +8,15 @@ #include #include #include +/* Bison stupidly redeclares malloc/free unless they are #defined + * (or a bunch of madder conditions) */ +#ifndef malloc +# define malloc malloc +# define free free +#endif #include "secnet.h" #include "conffile_internal.h" +#include "conffile.yy.h" #include "util.h" #define YYERROR_VERBOSE @@ -96,7 +103,7 @@ static struct p_node *node(uint32_t type, struct p_node *l, struct p_node *r) { struct p_node *rv; - rv=safe_malloc(sizeof(*rv),"p_node"); + NEW(rv); rv->type=type; rv->loc.file=config_file; rv->loc.line=config_lineno;