diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2013-03-21 16:54:38 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2013-03-21 16:54:38 +0000 |
commit | 9f8a5a9778c020420c3cb2a92a3f4d0fd444d625 (patch) | |
tree | cfe700939e73e9a4d0e017738a7dc7195613dbaf /usr.bin/tmux | |
parent | 660399aee461f54ef01834a44c50b2cb3d226621 (diff) |
Fix a couple of memory leaks, from Romain Francoise.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/cfg.c | 6 | ||||
-rw-r--r-- | usr.bin/tmux/mode-key.c | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/tmux/cfg.c b/usr.bin/tmux/cfg.c index 9530e76b9b5..6836ebbdfa7 100644 --- a/usr.bin/tmux/cfg.c +++ b/usr.bin/tmux/cfg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cfg.c,v 1.21 2012/12/13 15:36:16 nicm Exp $ */ +/* $OpenBSD: cfg.c,v 1.22 2013/03/21 16:54:37 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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/usr.bin/tmux/mode-key.c b/usr.bin/tmux/mode-key.c index 0392527d27b..012a0c97c02 100644 --- a/usr.bin/tmux/mode-key.c +++ b/usr.bin/tmux/mode-key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mode-key.c,v 1.50 2012/11/19 10:51:25 nicm Exp $ */ +/* $OpenBSD: mode-key.c,v 1.51 2013/03/21 16:54:37 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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 }, |