linux/drivers/power
Alexey Charkov 0d6c5794fd power: sequencing: pcie-m2: Fix leaking array from of_regulator_bulk_get_all()
of_regulator_bulk_get_all() allocates the consumers array and hands it to
the caller, who is expected to free it at an appropriate time.
pwrseq-pcie-m2.c never did, leading to a memory leak.

Add an explicit kfree() for the consumers array.

Cc: stable@vger.kernel.org
Fixes: 52e7b5bd62 ("power: sequencing: Add the Power Sequencing driver for the PCIe M.2 connectors")
Signed-off-by: Alexey Charkov <alchark@flipper.net>
Link: https://patch.msgid.link/20260930-m2-pwrseq-kfree-v1-1-82678b02c126@flipper.net
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-10-01 09:51:59 +02:00
..
reset treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
sequencing power: sequencing: pcie-m2: Fix leaking array from of_regulator_bulk_get_all() 2026-10-01 09:51:59 +02:00
supply treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
Kconfig power: sequencing: implement the pwrseq core 2024-06-12 09:20:13 +02:00
Makefile power: sequencing: implement the pwrseq core 2024-06-12 09:20:13 +02:00