X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=conffile.y;h=9f32cfdaf5c6ba53d4f37397449043351b97dc51;hb=4d9d6e20e19c1aaa0d138e70897d136b36d673c0;hp=1625122fe762f4a83831eda9c9b3ad55bfd3201b;hpb=27f5042b0435d26ae98b22f8e42115e44afe53bc;p=secnet.git diff --git a/conffile.y b/conffile.y index 1625122..9f32cfd 100644 --- a/conffile.y +++ b/conffile.y @@ -8,6 +8,12 @@ #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" @@ -97,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;