%{
/*
- * Copyright (C) 2013 Jo-Philipp Wich <jow@openwrt.org>
+ * Copyright (C) 2013-2014 Jo-Philipp Wich <jow@openwrt.org>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
struct jp_state {
struct jp_opcode *pool;
struct jp_opcode *path;
- const char *error;
+ char *error;
char str_quote;
char str_buf[128];
char *str_ptr;
void
yyerror(struct jp_state *s, const char *msg)
{
- s->error = msg;
+ s->error = strdup(msg);
}
static struct jp_opcode *
op = tmp;
}
+ if (s->error)
+ free(s->error);
+
free(s);
}