diff options
author | Mattias Jacobsson <2pi@mok.nu> | 2018-12-29 17:17:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-04 15:41:05 +0300 |
commit | c578977e5f6865ec5f37ad2ad9b2dd2d8ab6f15f (patch) | |
tree | b79050ddfda1f33510aa30e28a40833bab253f9f /tools/perf/util | |
parent | b69259a15b12489ac01a03c92e18cbc6ab641e6d (diff) | |
download | linux-c578977e5f6865ec5f37ad2ad9b2dd2d8ab6f15f.tar.xz |
perf strbuf: Remove redundant va_end() in strbuf_addv()
commit 099be748865eece21362aee416c350c0b1ae34df upstream.
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>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/strbuf.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/perf/util/strbuf.c b/tools/perf/util/strbuf.c index 842cf3fd9235..d7e5c247c103 100644 --- a/tools/perf/util/strbuf.c +++ b/tools/perf/util/strbuf.c @@ -116,7 +116,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); |