* Report actual unexpected packet number, rather than an unhelpful
`%i'.
* Free each individual remote block, rather than the first one lots of
times. Fixes glibc heap error reported by David Kreil.
- const static char msg[] = "\n[Unexpected packet, type %i]\n";
- p->output(e, msg, sizeof(msg) - 1);
+ dstr d = DSTR_INIT;
+ dstr_putf(&d, "\n[Unexpected packet, type %i]\n", t);
+ p->output(e, d.buf, d.len);
+ dstr_destroy(&d);
{
archcons *aa;
for (aa = a; aa; aa = aa->cdr)
{
archcons *aa;
for (aa = a; aa; aa = aa->cdr)
}
/* --- Tidy away the architecture list --- */
}
/* --- Tidy away the architecture list --- */