summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2019-10-14 08:38:07 +0000
committernicm <nicm@openbsd.org>2019-10-14 08:38:07 +0000
commitd09880d0e41b96edf6d49b3373da7d305c24fbe6 (patch)
tree2537668411d9b185b9b07e7b7390291bed2b1f9d
parentunpriv(): propagate error code to the caller instead of failing hard. (diff)
downloadwireguard-openbsd-d09880d0e41b96edf6d49b3373da7d305c24fbe6.tar.xz
wireguard-openbsd-d09880d0e41b96edf6d49b3373da7d305c24fbe6.zip
Memory leaks, from Igor Wong in GitHub issue 1934.
-rw-r--r--usr.bin/tmux/cmd-parse.y3
-rw-r--r--usr.bin/tmux/options.c3
-rw-r--r--usr.bin/tmux/tmux.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-parse.y b/usr.bin/tmux/cmd-parse.y
index d26bb18029b..516b3f48a57 100644
--- a/usr.bin/tmux/cmd-parse.y
+++ b/usr.bin/tmux/cmd-parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-parse.y,v 1.19 2019/10/03 10:24:05 nicm Exp $ */
+/* $OpenBSD: cmd-parse.y,v 1.20 2019/10/14 08:38:07 nicm Exp $ */
/*
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -696,6 +696,7 @@ cmd_parse_build_commands(struct cmd_parse_commands *cmds,
pr.status = CMD_PARSE_ERROR;
pr.error = cmd_parse_get_error(pi->file, line, cause);
free(cause);
+ cmd_list_free(cmdlist);
goto out;
}
cmd_list_append(cmdlist, add);
diff --git a/usr.bin/tmux/options.c b/usr.bin/tmux/options.c
index b31061b7066..56fee7da9c7 100644
--- a/usr.bin/tmux/options.c
+++ b/usr.bin/tmux/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.52 2019/06/23 10:00:29 nicm Exp $ */
+/* $OpenBSD: options.c,v 1.53 2019/10/14 08:38:07 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -296,6 +296,7 @@ options_remove(struct options_entry *o)
else
options_value_free(o, &o->value);
RB_REMOVE(options_tree, &oo->tree, o);
+ free((void *)o->name);
free(o);
}
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c
index 4dda60659d8..3351e5a3c93 100644
--- a/usr.bin/tmux/tmux.c
+++ b/usr.bin/tmux/tmux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.c,v 1.189 2019/06/20 11:59:59 nicm Exp $ */
+/* $OpenBSD: tmux.c,v 1.190 2019/10/14 08:38:07 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -130,6 +130,7 @@ make_label(const char *label, char **cause)
free(base);
goto fail;
}
+ free(base);
if (mkdir(resolved, S_IRWXU) != 0 && errno != EEXIST)
goto fail;