diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-01-23 17:50:57 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-01-23 17:50:57 +0000 |
commit | 4093a64aeed5e515963f8a03f78ba6a880363ac6 (patch) | |
tree | ce9792a5d96aefd3beda316f988cc8f9de94e6e0 /usr.bin/tmux/cmd-unbind-key.c | |
parent | 05ebff4687ac806b92ee30ddc9c41bbb4a82a28b (diff) |
Don't leak if arguments appear multiple times, from Tiago Cunha.
Diffstat (limited to 'usr.bin/tmux/cmd-unbind-key.c')
-rw-r--r-- | usr.bin/tmux/cmd-unbind-key.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-unbind-key.c b/usr.bin/tmux/cmd-unbind-key.c index b278bb0c2f7..5677f0867a5 100644 --- a/usr.bin/tmux/cmd-unbind-key.c +++ b/usr.bin/tmux/cmd-unbind-key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-unbind-key.c,v 1.6 2009/11/13 19:53:29 nicm Exp $ */ +/* $OpenBSD: cmd-unbind-key.c,v 1.7 2010/01/23 17:50:56 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -67,7 +67,8 @@ cmd_unbind_key_parse(struct cmd *self, int argc, char **argv, char **cause) no_prefix = 1; break; case 't': - data->tablename = xstrdup(optarg); + if (data->tablename == NULL) + data->tablename = xstrdup(optarg); break; default: goto usage; |