summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-04-16 20:33:47 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-04-16 20:33:47 +0000
commit488e4899c0a4ee73e494e45738c316f27434aedb (patch)
tree687c80706f7d55bf118eeaeb83d0b4a924ce08d6
parentda2b8188a582c4e463e639ddf254cd219b543092 (diff)
Memory leak, from David CARLIER.
-rw-r--r--usr.bin/tmux/tmux.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c
index 68affab3ecc..bb55e6d9595 100644
--- a/usr.bin/tmux/tmux.c
+++ b/usr.bin/tmux/tmux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.c,v 1.178 2017/03/21 19:28:03 nicm Exp $ */
+/* $OpenBSD: tmux.c,v 1.179 2017/04/16 20:33:46 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -141,6 +141,8 @@ make_label(const char *label)
if (realpath(base, resolved) == NULL)
strlcpy(resolved, base, sizeof resolved);
xasprintf(&path, "%s/%s", resolved, label);
+
+ free(base);
return (path);
fail: