1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-01 06:20:55 +01:00

fix two memory leaks (found by Felix): pre-compiled patterns when re-defining styles and compredirs-copies in comp_wrapper() (17029)

This commit is contained in:
Sven Wischnowsky 2002-04-24 07:59:17 +00:00
parent 45af2f90f9
commit ed98c0bed8
3 changed files with 8 additions and 0 deletions

View file

@ -132,6 +132,7 @@ setstypat(Style s, char *pat, Patprog prog, char **vals, int eval)
freearray(p->vals);
if (p->eval)
freeeprog(p->eval);
freepatprog(p->prog);
p->vals = zarrdup(vals);
p->eval = eprog;

View file

@ -1320,6 +1320,7 @@ comp_wrapper(Eprog prog, FuncWrap w, char *name)
zsfree(oqs);
zsfree(oaq);
freearray(owords);
freearray(oredirs);
}
zsfree(comprestore);
comprestore = orest;