about summary refs log tree commit diff
path: root/Src/Zle/comp1.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:15:04 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:15:04 +0000
commitba4f5e80ec9d7e145718e79fed6e57a852c86c12 (patch)
treeae29f2dfb81bb4e20b015610d85ce5f5a2d96eda /Src/Zle/comp1.c
parent850fb2e7f94b4e0e9fbf3538ad9e3c44c9fed74b (diff)
downloadzsh-ba4f5e80ec9d7e145718e79fed6e57a852c86c12.tar.gz
zsh-ba4f5e80ec9d7e145718e79fed6e57a852c86c12.tar.xz
zsh-ba4f5e80ec9d7e145718e79fed6e57a852c86c12.zip
zsh-3.1.5-pws-8 zsh-3.1.5-pws-8
Diffstat (limited to 'Src/Zle/comp1.c')
-rw-r--r--Src/Zle/comp1.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Src/Zle/comp1.c b/Src/Zle/comp1.c
index a5e35bc3c..77fe0a1fe 100644
--- a/Src/Zle/comp1.c
+++ b/Src/Zle/comp1.c
@@ -49,7 +49,7 @@ void (*makecompparamsptr) _((void));
 /* pointers to functions required by compctl and defined by zle */
 
 /**/
-void (*addmatchesptr) _((char *, char *, char *, char *, char *, char *, char *, char *, int, int, Cmatcher, char **));
+void (*addmatchesptr) _((char *, char *, char *, char *, char *, char *, char *, char *, char *, char *, int, int, Cmatcher, char **));
 
 /**/
 char *(*comp_strptr) _((int*,int*));
@@ -61,7 +61,7 @@ int (*getcpatptr) _((char *, int, char *, int));
 void (*makecomplistcallptr) _((Compctl));
 
 /**/
-void (*makecomplistctlptr) _((int));
+int (*makecomplistctlptr) _((int));
 
 /* Hash table for completion info for commands */
  
@@ -249,6 +249,9 @@ freecmatcher(Cmatcher m)
 {
     Cmatcher n;
 
+    if (!m || --(m->refc))
+	return;
+
     while (m) {
 	n = m->next;
 	freecpattern(m->line);