summaryrefslogtreecommitdiffstats
path: root/procname.c
diff options
context:
space:
mode:
authornicm <nicm>2014-04-16 23:05:38 +0000
committernicm <nicm>2014-04-16 23:05:38 +0000
commit5acee1c04ed38afd6a32da4a66e6855ccdc52af3 (patch)
treefe2891f503a86f532eba2318dd598dc3580b8208 /procname.c
parent871b83cbab3a490827760540f2c36fd1edfe1875 (diff)
Memory leak in error path and unnecessary assignment, from clang.
Diffstat (limited to 'procname.c')
-rw-r--r--procname.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/procname.c b/procname.c
index ee9b99dc..5d3bc306 100644
--- a/procname.c
+++ b/procname.c
@@ -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)