summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2014-04-16 23:05:38 +0000
committernicm <nicm@openbsd.org>2014-04-16 23:05:38 +0000
commit97bb737e7a5183b78765d7456a0e370d876bf7a3 (patch)
tree613fe84c5017b18fdd9d83a0a3904478e0908cb2 /usr.bin/tmux
parentAdd ufs2 support and get one step closer to making ffs2 bootable. This work was done by Pedro Martelletto for bitrig. One small tweak to make it buildable with -Werror. "Please commit" miod@ (diff)
downloadwireguard-openbsd-97bb737e7a5183b78765d7456a0e370d876bf7a3.tar.xz
wireguard-openbsd-97bb737e7a5183b78765d7456a0e370d876bf7a3.zip
Memory leak in error path and unnecessary assignment, from clang.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/cmd-save-buffer.c3
-rw-r--r--usr.bin/tmux/grid.c4
-rw-r--r--usr.bin/tmux/procname.c4
3 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/tmux/cmd-save-buffer.c b/usr.bin/tmux/cmd-save-buffer.c
index 20755780b34..1e9b11825a2 100644
--- a/usr.bin/tmux/cmd-save-buffer.c
+++ b/usr.bin/tmux/cmd-save-buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-save-buffer.c,v 1.22 2014/04/07 10:32:16 nicm Exp $ */
+/* $OpenBSD: cmd-save-buffer.c,v 1.23 2014/04/16 23:05:38 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -142,7 +142,6 @@ do_print:
return (CMD_RETURN_ERROR);
}
msg = NULL;
- msglen = 0;
used = 0;
while (used != pb->size) {
diff --git a/usr.bin/tmux/grid.c b/usr.bin/tmux/grid.c
index 6c00ca0f3ed..4b3de5c38d0 100644
--- a/usr.bin/tmux/grid.c
+++ b/usr.bin/tmux/grid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grid.c,v 1.36 2014/03/31 21:42:27 nicm Exp $ */
+/* $OpenBSD: grid.c,v 1.37 2014/04/16 23:05:38 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -624,7 +624,7 @@ grid_string_cells(struct grid *gd, u_int px, u_int py, u_int nx,
off += size;
}
- if (trim) {
+ if (trim) {
while (off > 0 && buf[off - 1] == ' ')
off--;
}
diff --git a/usr.bin/tmux/procname.c b/usr.bin/tmux/procname.c
index b3acfd0ebfa..4fb96038fe2 100644
--- a/usr.bin/tmux/procname.c
+++ b/usr.bin/tmux/procname.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procname.c,v 1.11 2013/10/10 12:39:24 nicm Exp $ */
+/* $OpenBSD: procname.c,v 1.12 2014/04/16 23:05:38 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -96,7 +96,7 @@ get_proc_name(int fd, char *tty)
retry:
if (sysctl(mib, nitems(mib), NULL, &len, NULL, 0) == -1)
- return (NULL);
+ goto error;
len = (len * 5) / 4;
if ((newbuf = realloc(buf, len)) == NULL)