Skip to contentSkip to conversation

hw/arm/vexpress: Don't double-free flash filename

PATCH Applied Peter Maydell 3 participants 5 messages Apr 2, 2015 Arm/versatile express platform

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/arm/vexpress: Don't double-free flash filename

Commits 6e05a12f8f7f and db25a1581 both attempt to fix the same "failed to free memory containing flash filename" bug, with the effect that when they were both applied we ended up freeing the memory twice. Delete the spurious extra free.

---
Shannon's patch fixes the virt.c board; I checked the other boards touched by 6e05a12f8f7f and they don't have the problem (either due to no conflicting patch or because the g_free() calls were in the same place and the merge combined them.)

 hw/arm/vexpress.c | 1 -
 1 file changed, 1 deletion(-)
hw/arm/vexpress.c +0 -1
index dd04527..54dd967 100644
@@ -583,7 +583,6 @@ static void vexpress_common_init(MachineState *machine)
             error_report("Could not load ROM image '%s'", bios_name);
             exit(1);
         }
-        g_free(fn);
     }
 
     /* Motherboard peripherals: the wiring is the same but the
Signature · 1 line
1.9.1
#1 lore raw

Am 02.04.2015 um 11:52 schrieb Peter Maydell:

Quoted 20 lines

Commits 6e05a12f8f7f and db25a1581 both attempt to fix the same "failed to free memory containing flash filename" bug, with the effect that when they were both applied we ended up freeing the memory twice. Delete the spurious extra free.

---
Shannon's patch fixes the virt.c board; I checked the other boards touched by 6e05a12f8f7f and they don't have the problem (either due to no conflicting patch or because the g_free() calls were in the same place and the merge combined them.)

 hw/arm/vexpress.c | 1 -
 1 file changed, 1 deletion(-)
hw/arm/vexpress.c +0 -0
index dd04527..54dd967 100644

hw/arm/vexpress.c static void vexpress_common_init(MachineState *machine) · line 588

Quoted 7 lines
hw/arm/vexpress.c +0 -1
@@ -583,7 +583,6 @@ static void vexpress_common_init(MachineState *machine)
             error_report("Could not load ROM image '%s'", bios_name);
             exit(1);
         }
-        g_free(fn);
     }
 
     /* Motherboard peripherals: the wiring is the same but the
#2 lore raw
Quoted 27 lines · Stefan Weil

Am 02.04.2015 um 11:52 schrieb Peter Maydell:

Quoted 26 lines

Commits 6e05a12f8f7f and db25a1581 both attempt to fix the same "failed to free memory containing flash filename" bug, with the effect that when they were both applied we ended up freeing the memory twice. Delete the spurious extra free.

---
Shannon's patch fixes the virt.c board; I checked the other boards touched by 6e05a12f8f7f and they don't have the problem (either due to no conflicting patch or because the g_free() calls were in the same place and the merge combined them.)

 hw/arm/vexpress.c | 1 -
 1 file changed, 1 deletion(-)
hw/arm/vexpress.c +0 -1
index dd04527..54dd967 100644
@@ -583,7 +583,6 @@ static void vexpress_common_init(MachineState *machine)
             error_report("Could not load ROM image '%s'", bios_name);
             exit(1);
         }
-        g_free(fn);
     }
 
Quoted 3 lines

hw/arm/vexpress.c static void vexpress_common_init(MachineState *machine) · line 588

Quoted 1 line
hw/arm/vexpress.c +0 -0
     /* Motherboard peripherals: the wiring is the same but the

Did you mean reviewed-by ?

-- PMM

Reviewed-by on v1 1/1
#3 lore raw
In reply to Peter Maydell
Quoted 21 lines · Peter Maydell

Commits 6e05a12f8f7f and db25a1581 both attempt to fix the same "failed to free memory containing flash filename" bug, with the effect that when they were both applied we ended up freeing the memory twice. Delete the spurious extra free.

---
Shannon's patch fixes the virt.c board; I checked the other boards touched by 6e05a12f8f7f and they don't have the problem (either due to no conflicting patch or because the g_free() calls were in the same place and the merge combined them.)

 hw/arm/vexpress.c | 1 -
 1 file changed, 1 deletion(-)
hw/arm/vexpress.c +0 -0
index dd04527..54dd967 100644

hw/arm/vexpress.c static void vexpress_common_init(MachineState *machine) · line 588

Quoted 7 lines
hw/arm/vexpress.c +0 -1
@@ -583,7 +583,6 @@ static void vexpress_common_init(MachineState *machine)
             error_report("Could not load ROM image '%s'", bios_name);
             exit(1);
         }
-        g_free(fn);
     }
 
     /* Motherboard peripherals: the wiring is the same but the
author Applied
#4 lore raw
In reply to Peter Maydell
Quoted 6 lines · Peter Maydell

Commits 6e05a12f8f7f and db25a1581 both attempt to fix the same "failed to free memory containing flash filename" bug, with the effect that when they were both applied we ended up freeing the memory twice. Delete the spurious extra free.

Quoted 8 lines

---
Shannon's patch fixes the virt.c board; I checked the other boards touched by 6e05a12f8f7f and they don't have the problem (either due to no conflicting patch or because the g_free() calls were in the same place and the merge combined them.)

 hw/arm/vexpress.c | 1 -
 1 file changed, 1 deletion(-)

Applied to master, thanks.

-- PMM