[PATCH] makedumpfile: fix free partial_bitmap2 error

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

 



Description:
In create_dump_bitmap, after prepare_bitmap2_buffer_cyclic was invoked,
info->partial_bitmap2 will pointed to a block of contiguous memory. But
free it in a wrong way because what free_bitmap2_buffer() free is
info->bitmap2 not info->partial_bitmap2.

Signed-off-by: Arthur Zou <zzou at redhat.com>
---
 makedumpfile.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index ce4a866..f0d2997 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -5143,7 +5143,8 @@ create_dump_bitmap(void)
 
 			info->num_dumpable = get_num_dumpable_cyclic();
 
-			free_bitmap2_buffer();
+			if (info->partial_bitmap2 != NULL)
+				free(info->partial_bitmap2);
 		}
 
 	} else {
-- 
1.8.4.2




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux