wt., 18 lut 2020 o 10:47 Srinivas Kandagatla srinivas.kandagatla@linaro.org napisaĆ(a):
On 18/02/2020 09:42, Bartosz Golaszewski wrote:
From: Bartosz Golaszewski bgolaszewski@baylibre.com
The nvmem struct is only freed on the first error check after its allocation and leaked after that. Fix it with a new label.
Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski bgolaszewski@baylibre.com
looks like 1/7 introduced the bug and 2/7 fixes it. IMO, you should 1/7 and 2/7 should be single patch.
The bug already exists in mainline - the nvmem object is only freed if ida_simple_get() fails, but any subsequent error leads to a memory leak. In other words: it doesn't matter if it's a single patch or two.
Bart