diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2014-04-16 23:05:39 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2014-04-16 23:05:39 +0000 |
commit | 65fd6d135d5458061b5259f68b3ef4566ce7e70e (patch) | |
tree | 905a501fcc789dc5980fb16f97e1e254ae03ca6c /usr.bin/tmux/procname.c | |
parent | 5ed0047f4dbc202effb39cae70bba7248e37e573 (diff) |
Memory leak in error path and unnecessary assignment, from clang.
Diffstat (limited to 'usr.bin/tmux/procname.c')
-rw-r--r-- | usr.bin/tmux/procname.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) |