diff options
| author | Malaya Kumar Rout <malayarout91@gmail.com> | 2026-07-11 20:22:45 +0530 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-07-23 15:21:13 +0200 |
| commit | 21d5c4cee31c5ce78f6decc7fafc7e7759af391f (patch) | |
| tree | c43fd410568ec2a01f88d4cb13021e58d3b83e65 /tools/perf/scripts/python | |
| parent | 45a7c1077ba759ee59d0549a66ed86e35815e18e (diff) | |
PM: hibernate: Fix memory leak in snapshot_write_next() error path
When memory_bm_create() succeeds for copy_bm but fails for zero_bm,
the function returns without freeing the resources allocated for
copy_bm. This results in a memory leak that includes radix tree nodes,
zone structures, and page lists.
Fix this by calling memory_bm_free() to release copy_bm's resources
before returning the error code when zero_bm allocation fails.
Fixes: 005e8dddd497 ("PM: hibernate: don't store zero pages in the image file")
Signed-off-by: Malaya Kumar Rout <malayarout91@gmail.com>
Acked-by: Brian Geffon <bgeffon@google.com>
Link: https://patch.msgid.link/20260711145246.8625-1-malayarout91@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
