aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-06-25 15:42:35 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-06-25 15:42:35 +0000
commit6528d47ed827657ed7eafbc547fa2112f04cf6cf (patch)
tree16dbc07135ed5259c020c522fe1cbc0c7ecb30d3
parent5b3db7b56c10d4e2bfd7ec109da42f9b2c682c4d (diff)
downloadrtmux-6528d47ed827657ed7eafbc547fa2112f04cf6cf.tar.gz
rtmux-6528d47ed827657ed7eafbc547fa2112f04cf6cf.tar.bz2
rtmux-6528d47ed827657ed7eafbc547fa2112f04cf6cf.zip
Don't leak memory if multiple -f flags are given. From ray
-rw-r--r--tmux.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tmux.c b/tmux.c
index 0327445f..e2cb146e 100644
--- a/tmux.c
+++ b/tmux.c
@@ -1,4 +1,4 @@
-/* $Id: tmux.c,v 1.123 2009-06-01 20:38:59 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>
@@ -240,6 +240,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':