acme: fix use after free in warning() call (thanks igor)
This commit is contained in:
parent
3c1022a3de
commit
01ab07ef72
1 changed files with 2 additions and 1 deletions
|
@ -610,13 +610,14 @@ winaddincl(Window *w, Rune *r, int n)
|
|||
r = runerealloc(r, n+1);
|
||||
r[n] = 0;
|
||||
}
|
||||
free(a);
|
||||
if((d->qid.type&QTDIR) == 0){
|
||||
free(d);
|
||||
warning(nil, "%s: not a directory\n", a);
|
||||
free(r);
|
||||
free(a);
|
||||
return;
|
||||
}
|
||||
free(a);
|
||||
free(d);
|
||||
w->nincl++;
|
||||
w->incl = realloc(w->incl, w->nincl*sizeof(Rune*));
|
||||
|
|
Loading…
Reference in a new issue