* [PATCH] makedumpfile: remove the double free of sph
@ 2015-08-26 3:22 Chao Fan
2015-08-26 3:59 ` HATAYAMA, Daisuke
0 siblings, 1 reply; 3+ messages in thread
From: Chao Fan @ 2015-08-26 3:22 UTC (permalink / raw)
To: kexec; +Cc: Chao Fan, ats-kumagai
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@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
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] makedumpfile: remove the double free of sph
2015-08-26 3:22 [PATCH] makedumpfile: remove the double free of sph Chao Fan
@ 2015-08-26 3:59 ` HATAYAMA, Daisuke
2015-08-26 4:23 ` Atsushi Kumagai
0 siblings, 1 reply; 3+ messages in thread
From: HATAYAMA, Daisuke @ 2015-08-26 3:59 UTC (permalink / raw)
To: Chao Fan, kexec
On 2015/08/26 12:22, Chao Fan wrote:
> 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@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;
> }
>
>
Thanks! It looks good to me.
Acked-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
--
Thanks.
HATAYAMA, Daisuke
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] makedumpfile: remove the double free of sph
2015-08-26 3:59 ` HATAYAMA, Daisuke
@ 2015-08-26 4:23 ` Atsushi Kumagai
0 siblings, 0 replies; 3+ messages in thread
From: Atsushi Kumagai @ 2015-08-26 4:23 UTC (permalink / raw)
To: Chao Fan, HATAYAMA, Daisuke; +Cc: kexec@lists.infradead.org
Hello,
>On 2015/08/26 12:22, Chao Fan wrote:
>> 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@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;
>> }
>>
>>
>
>Thanks! It looks good to me.
>
>Acked-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
>
>--
>Thanks.
>HATAYAMA, Daisuke
I'll merge this patch into v1.5.9, thanks.
Regards,
Atsushi Kumagai
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-26 4:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-26 3:22 [PATCH] makedumpfile: remove the double free of sph Chao Fan
2015-08-26 3:59 ` HATAYAMA, Daisuke
2015-08-26 4:23 ` Atsushi Kumagai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.