[PATCH] makedumpfile: remove the double free of sph
Chao Fan
cfan at redhat.com
Tue Aug 25 20:22:34 PDT 2015
sph will be freed twice when it meet below conditions:
sph->signature1 != SADUMP_SIGNATURE1 ||
sph->signature2 != SADUMP_SIGNATURE2
Then it will be freed once and goto error: to free again. So remove the
1st free.
Signed-off-by: Chao Fan <cfan at redhat.com>
---
sadump_info.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sadump_info.c b/sadump_info.c
index e8154f4..1474fb2 100644
--- a/sadump_info.c
+++ b/sadump_info.c
@@ -695,7 +695,6 @@ read_sadump_header_diskset(int diskid, struct sadump_diskset_info *sdi)
if (sph->signature1 != SADUMP_SIGNATURE1 ||
sph->signature2 != SADUMP_SIGNATURE2) {
DEBUG_MSG("sadump: does not have partition header\n");
- free(sph);
goto error;
}
--
2.4.3
More information about the kexec
mailing list