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:
parent
45af2f90f9
commit
ed98c0bed8
3 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -1320,6 +1320,7 @@ comp_wrapper(Eprog prog, FuncWrap w, char *name)
|
|||
zsfree(oqs);
|
||||
zsfree(oaq);
|
||||
freearray(owords);
|
||||
freearray(oredirs);
|
||||
}
|
||||
zsfree(comprestore);
|
||||
comprestore = orest;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue