diff options
author | 2009-06-02 10:49:40 +0000 | |
---|---|---|
committer | 2009-06-02 10:49:40 +0000 | |
commit | 0cf617ede228df6ade3f1b7a3f52570876fc649e (patch) | |
tree | fc3bd21fc531f29777ab6444a8609ca96d16edd8 /usr.bin/tmux/tmux.c | |
parent | strip /<version>/<arch> part from the install url before feeding it back (diff) | |
download | wireguard-openbsd-0cf617ede228df6ade3f1b7a3f52570876fc649e.tar.xz wireguard-openbsd-0cf617ede228df6ade3f1b7a3f52570876fc649e.zip |
Don't leak memory if multiple -f flags are given.
OK nicm@
Diffstat (limited to 'usr.bin/tmux/tmux.c')
-rw-r--r-- | usr.bin/tmux/tmux.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c index aa470d955da..63769884181 100644 --- a/usr.bin/tmux/tmux.c +++ b/usr.bin/tmux/tmux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.c,v 1.1 2009/06/01 22:58:49 nicm Exp $ */ +/* $OpenBSD: tmux.c,v 1.2 2009/06/02 10:49:40 ray Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -227,6 +227,8 @@ main(int argc, char **argv) flags &= ~IDENTIFY_256COLOURS; break; case 'f': + if (cfg_file) + xfree(cfg_file); cfg_file = xstrdup(optarg); break; case 'L': |