Commit 26b7009
committed
ACPI/IORT: Fix memory leak in iort_rmr_alloc_sids()
JIRA: https://issues.redhat.com/browse/RHEL-114091
commit f3ef711
Author: Miaoqian Lin <linmq006@gmail.com>
Date: Thu, 04 Sep 2025 17:00:01 +0000
If krealloc_array() fails in iort_rmr_alloc_sids(), the function returns
NULL but does not free the original 'sids' allocation. This results in a
memory leak since the caller overwrites the original pointer with the
NULL return value.
Fixes: 491cf4a ("ACPI/IORT: Add support to retrieve IORT RMR reserved regions")
Cc: <stable@vger.kernel.org> # 6.0.x
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Link: https://lore.kernel.org/r/20250828112243.61460-1-linmq006@gmail.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>1 parent e9a9334 commit 26b7009
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
937 | 937 | | |
938 | 938 | | |
939 | 939 | | |
940 | | - | |
| 940 | + | |
| 941 | + | |
941 | 942 | | |
| 943 | + | |
942 | 944 | | |
943 | 945 | | |
944 | 946 | | |
| |||
0 commit comments