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);
}