summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Src/Modules/zutil.c1
-rw-r--r--Src/Zle/complete.c1
3 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index db2ff2277..c5f9b94e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-04-24  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 17029: Src/Modules/zutil.c, Src/Zle/complete.c: fix two
+	memory leaks (found by Felix): pre-compiled patterns when
+	re-defining styles and compredirs-copies in comp_wrapper()
+
 2002-04-23  Bart Schaefer  <schaefer@zsh.org>
 
 	* users/4851: Functions/Misc/relative: new function inspired by
diff --git a/Src/Modules/zutil.c b/Src/Modules/zutil.c
index 85ab4b394..3443f870d 100644
--- a/Src/Modules/zutil.c
+++ b/Src/Modules/zutil.c
@@ -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;
 
diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c
index a787528c2..e1051c30c 100644
--- a/Src/Zle/complete.c
+++ b/Src/Zle/complete.c
@@ -1320,6 +1320,7 @@ comp_wrapper(Eprog prog, FuncWrap w, char *name)
 	    zsfree(oqs);
 	    zsfree(oaq);
 	    freearray(owords);
+	    freearray(oredirs);
 	}
 	zsfree(comprestore);
 	comprestore = orest;