[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-099be748865eece21362aee416c350c0b1ae34df@git.kernel.org>
Date: Tue, 8 Jan 2019 07:44:51 -0800
From: tip-bot for Mattias Jacobsson <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: sansharm@...hat.com, jolsa@...nel.org, hpa@...or.com,
mingo@...nel.org, 2pi@....nu, tglx@...utronix.de,
linux-kernel@...r.kernel.org, acme@...hat.com, peterz@...radead.org
Subject: [tip:perf/urgent] perf strbuf: Remove redundant va_end() in
strbuf_addv()
Commit-ID: 099be748865eece21362aee416c350c0b1ae34df
Gitweb: https://git.kernel.org/tip/099be748865eece21362aee416c350c0b1ae34df
Author: Mattias Jacobsson <2pi@....nu>
AuthorDate: Sat, 29 Dec 2018 15:17:50 +0100
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 4 Jan 2019 12:54:49 -0300
perf strbuf: Remove redundant va_end() in strbuf_addv()
Each call to va_copy() should have one, and only one, corresponding call
to va_end(). In strbuf_addv() some code paths result in va_end() getting
called multiple times. Remove the superfluous va_end().
Signed-off-by: Mattias Jacobsson <2pi@....nu>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Sanskriti Sharma <sansharm@...hat.com>
Link: http://lkml.kernel.org/r/20181229141750.16945-1-2pi@mok.nu
Fixes: ce49d8436cff ("perf strbuf: Match va_{add,copy} with va_end")
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/strbuf.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/perf/util/strbuf.c b/tools/perf/util/strbuf.c
index 9005fbe0780e..23092fd6451d 100644
--- a/tools/perf/util/strbuf.c
+++ b/tools/perf/util/strbuf.c
@@ -109,7 +109,6 @@ static int strbuf_addv(struct strbuf *sb, const char *fmt, va_list ap)
return ret;
}
len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap_saved);
- va_end(ap_saved);
if (len > strbuf_avail(sb)) {
pr_debug("this should not happen, your vsnprintf is broken");
va_end(ap_saved);
Powered by blists - more mailing lists