platform: msm_shared: Fix the double free of buffer, which used to store partition entries
A buffer, allocated in partition_parse_gpt_header() for storing the
partition entries and re-use for validations. In mmc_boot_read_gpt(),
this buffer is double freed in error path. Fix the buffer free.
Change-Id: I567b9de63e163e307ea8480b452abcaa0bc7891e
Signed-off-by: Saranya Chidura <schidura@codeaurora.org>
diff --git a/platform/msm_shared/partition_parser.c b/platform/msm_shared/partition_parser.c
index d8df054..bd3cf39 100755
--- a/platform/msm_shared/partition_parser.c
+++ b/platform/msm_shared/partition_parser.c
@@ -1330,6 +1330,8 @@
}
fail:
free(new_buffer);
+ new_buffer = NULL;
+
return ret;
}