summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2013-03-21 16:54:37 +0000
committerNicholas Marriott <nicm@openbsd.org>2013-03-21 16:54:37 +0000
commit51ac2a3202d55c439976ecce49229e35865c7ebd (patch)
tree554f1705c19c6612162b0c4f0bb4ad6cf05c5cc7
parent48291f0eeb9c376f821c746ca1ab6b88fcb62db2 (diff)
Fix a couple of memory leaks, from Romain Francoise.
-rw-r--r--cfg.c4
-rw-r--r--mode-key.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/cfg.c b/cfg.c
index f9ad300f..aa2ceea4 100644
--- a/cfg.c
+++ b/cfg.c
@@ -131,8 +131,10 @@ load_cfg(const char *path, struct cmd_ctx *ctxin, struct causelist *causes)
buf = copy;
while (isspace((u_char)*buf))
buf++;
- if (*buf == '\0')
+ if (*buf == '\0') {
+ free(copy);
continue;
+ }
if (cmd_string_parse(buf, &cmdlist, &cause) != 0) {
free(copy);
diff --git a/mode-key.c b/mode-key.c
index 821f1ef4..6c041359 100644
--- a/mode-key.c
+++ b/mode-key.c
@@ -413,7 +413,6 @@ const struct mode_key_entry mode_key_emacs_copy[] = {
{ '\026' /* C-v */, 0, MODEKEYCOPY_NEXTPAGE },
{ '\027' /* C-w */, 0, MODEKEYCOPY_COPYSELECTION },
{ '\033' /* Escape */, 0, MODEKEYCOPY_CANCEL },
- { 'N', 0, MODEKEYCOPY_SEARCHREVERSE },
{ 'b' | KEYC_ESCAPE, 0, MODEKEYCOPY_PREVIOUSWORD },
{ 'f', 0, MODEKEYCOPY_JUMP },
{ 'f' | KEYC_ESCAPE, 0, MODEKEYCOPY_NEXTWORDEND },