Re: [PATCH v9 05/19] ACPI: processor: Fix memory leaks in error paths of processor_add()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/1/24 00:24, Jonathan Cameron wrote:
If acpi_processor_get_info() returned an error, pr and the associated
pr->throttling.shared_cpu_map were leaked.

The unwind code was in the wrong order wrt to setup, relying on
some unwind actions having no affect (clearing variables that were
never set etc).  That makes it harder to reason about so reorder
and add appropriate labels to only undo what was actually set up
in the first place.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>

---
v9: New patch in response to Gavin noticing a memory leak later in the
     series.
---
  drivers/acpi/acpi_processor.c | 15 ++++++++-------
  1 file changed, 8 insertions(+), 7 deletions(-)


Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux