From 4093a64aeed5e515963f8a03f78ba6a880363ac6 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 23 Jan 2010 17:50:57 +0000 Subject: Don't leak if arguments appear multiple times, from Tiago Cunha. --- usr.bin/tmux/cmd-unbind-key.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin/tmux/cmd-unbind-key.c') 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 @@ -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; -- cgit v1.2.3