[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <685bb0ec-c08a-d7e5-6aa3-fb7ca842d0d0@web.de>
Date: Thu, 11 Jun 2020 21:09:22 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Chen Wandun <chenwandun@...wei.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, bpf@...r.kernel.org
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
Cheng Jian <cj.chengjian@...wei.com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH v2 2/2] perf tools: Improve exception handling in two
functions of perf events parser
> Fix potential memory leak. Function new_term may return error, so
> it is need to free memory when the return value is negative.
How do you think about a wording variant like the following?
Add jump targets so that a configuration object and a duplicated string
are released after a call of the function “strdup” or “new_term” failed.
Regards,
Markus
Powered by blists - more mailing lists