* macro.c (expand_irp): Free memory on error return paths.
sb_new (&sub);
if (! buffer_and_nest (NULL, "ENDR", &sub, get_line))
- return _("unexpected end of file in irp or irpc");
+ {
+ err = _("unexpected end of file in irp or irpc");
+ goto out2;
+ }
sb_new (&f.name);
sb_new (&f.def);
idx = get_token (idx, in, &f.name);
if (f.name.len == 0)
- return _("missing model parameter");
+ {
+ err = _("missing model parameter");
+ goto out1;
+ }
h = str_htab_create ();
}
htab_delete (h);
+ out1:
sb_kill (&f.actual);
sb_kill (&f.def);
sb_kill (&f.name);
+ out2:
sb_kill (&sub);
return err;