makedumpfile: remove the double free of sph
Subsystems (2)
PATCH 1/1 makedumpfile: remove the double free of sph
sph will be freed twice when it meet below conditions:
sph->signature1 != SADUMP_SIGNATURE1 ||
sph->signature2 != SADUMP_SIGNATURE2Then it will be freed once and goto error: to free again. So remove the 1st free.
--- sadump_info.c | 1 - 1 file changed, 1 deletion(-)
sadump_info.c +0 -1
@@ -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; }
Signature · 7 lines
2.4.3 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Quoted 19 lines · Chao Fan
sph will be freed twice when it meet below conditions:
sph->signature1 != SADUMP_SIGNATURE1 || sph->signature2 != SADUMP_SIGNATURE2Then it will be freed once and goto error: to free again. So remove the 1st free.
Signed-off-by Chao Fan <[email protected]>--- sadump_info.c | 1 - 1 file changed, 1 deletion(-)sadump_info.c +0
-0
sadump_info.c read_sadump_header_diskset(int diskid, struct sadump_diskset_info *sdi) · line 700
Quoted 7 lines
sadump_info.c +0
-1@@ -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; }
Thanks! It looks good to me.
Signature · 8 lines
Thanks. HATAYAMA, Daisuke _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Hello,
Quoted 30 lines · Chao Fan
Quoted 19 lines
sph will be freed twice when it meet below conditions:
sph->signature1 != SADUMP_SIGNATURE1 || sph->signature2 != SADUMP_SIGNATURE2Then it will be freed once and goto error: to free again. So remove the 1st free.
Signed-off-by Chao Fan <[email protected]>--- sadump_info.c | 1 - 1 file changed, 1 deletion(-)sadump_info.c +0
-0sadump_info.c read_sadump_header_diskset(int diskid, struct sadump_diskset_info *sdi) · line 700
Quoted 7 lines
sadump_info.c +0
-1@@ -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; }Thanks! It looks good to me.
Quoted 5 lines
Acked-by HATAYAMA Daisuke <[email protected]>--
Thanks.
HATAYAMA, Daisuke
I'll merge this patch into v1.5.9, thanks.
Regards,
Atsushi Kumagai
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec