We weren't correctly skipping the location operators
in codefree. This would mostly be work, but sometimes
you'd get unlucky and have one of the argmuents mismatch,
and that would lead to an invalid free.
This correctly skips the args in codefree.
emits(fnstr(c1));
if((f = curfile(runq)) != nil){
emitf(Xsrcfile);
- emits(strdup(f));
+ emits(estrdup(f));
}
emitf(Xsrcline);
emiti(runq->lexline);
|| p->f==Xrdwr
|| p->f==Xasync || p->f==Xbackq || p->f==Xcase || p->f==Xfalse
|| p->f==Xfor || p->f==Xjump
+ || p->f==Xsrcline
|| p->f==Xsubshell || p->f==Xtrue) p++;
else if(p->f==Xdup || p->f==Xpipefd) p+=2;
else if(p->f==Xpipe) p+=4;
- else if(p->f==Xglobs) free(p[1].s), p+=2;
+ else if(p->f==Xglobs || p->f==Xsrcfile) free(p[1].s), p+=2;
else if(p->f==Xword || p->f==Xdelhere) free((++p)->s);
else if(p->f==Xfn){
free(p[2].s);