summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/strbuf.c
diff options
context:
space:
mode:
authorMattias Jacobsson <2pi@mok.nu>2018-12-29 15:17:50 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-01-04 16:54:49 +0100
commit099be748865eece21362aee416c350c0b1ae34df (patch)
tree12812a6d30186fb40730355af3cc98545f2210d7 /tools/perf/util/strbuf.c
parentperf annotate: Pass filename to objdump via execl (diff)
downloadlinux-099be748865eece21362aee416c350c0b1ae34df.tar.xz
linux-099be748865eece21362aee416c350c0b1ae34df.zip
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@mok.nu> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sanskriti Sharma <sansharm@redhat.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@redhat.com>
Diffstat (limited to 'tools/perf/util/strbuf.c')
-rw-r--r--tools/perf/util/strbuf.c1
1 files changed, 0 insertions, 1 deletions
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);