summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2008-11-11 22:40:16 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2008-11-11 22:40:16 +0000
commit085419f95d8fd93b3b2ead550512030f22a16a8f (patch)
treec2c3ceb3d484f4971cbc01fdfe6cb5335d6241b0
parent4b39a04c14c34db7e5f6f81a86f049d2411fdaf1 (diff)
downloadzsh-085419f95d8fd93b3b2ead550512030f22a16a8f.tar.gz
zsh-085419f95d8fd93b3b2ead550512030f22a16a8f.zip
26024: don't leave ref count incremented when aborting bindkey with an error
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/zle_keymap.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c1cd02d9..105592ae6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-11 Oliver Kiddle <opk@zsh.org>
+
+ * 26024: Src/Zle/zle_keymap.c: don't leave reference count
+ incremented when aborting bindkey with an error
+
2008-11-11 Clint Adams <clint@zsh.org>
* 26027: Src/Zle/compctl.c: free pprogc before it goes out of
diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c
index 3c8cc4d9d..9dac62049 100644
--- a/Src/Zle/zle_keymap.c
+++ b/Src/Zle/zle_keymap.c
@@ -918,11 +918,12 @@ bin_bindkey_bind(char *name, char *kmname, Keymap km, char **argv, Options ops,
metafy(m, 1, META_NOALLOC);
bindkey(km, m, refthingy(fn), str);
}
- unrefthingy(fn);
}
+ unrefthingy(fn);
} else {
if(bindkey(km, seq, fn, str)) {
zwarnnam(name, "cannot bind to an empty key sequence");
+ unrefthingy(fn);
ret = 1;
}
}