[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190104154846.GC9833@kernel.org>
Date: Fri, 4 Jan 2019 12:48:46 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Mattias Jacobsson <2pi@....nu>
Cc: peterz@...radead.org, mingo@...hat.com, sansharm@...hat.com,
linux-kernel@...r.kernel.org, Jiri Olsa <jolsa@...nel.org>
Subject: Re: [PATCH] perf tools: util: remove redundant va_end() in
strbuf_addv()
Em Sat, Dec 29, 2018 at 03:17:50PM +0100, Mattias Jacobsson escreveu:
> 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().
>
> Fixes: ce49d8436cff ("perf strbuf: Match va_{add,copy} with va_end")
> Signed-off-by: Mattias Jacobsson <2pi@....nu>
Its nice that you included the Fixes tag!
Thanks, applied.
- Arnaldo
> ---
> 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);
> --
> 2.20.1
--
- Arnaldo
Powered by blists - more mailing lists