target-arm: Fix use of free() in cpu_arm_close()
PATCH 1/1 target-arm: Fix use of free() in cpu_arm_close()
env is allocated in cpu_arm_init() with g_malloc0(), so free with g_free().
--- target-arm/helper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
target-arm/helper.c +1 -1
@@ -471,7 +471,7 @@ static uint32_t cpu_arm_find_by_name(const char *name)void cpu_arm_close (CPUARMState *env) { -free (env); +g_free (env); }uint32_t cpsr_read (CPUARMState *env)
Signature · 1 line
1.7.6.4
Am 10.10.2011 14:52, schrieb Andreas Färber:
Quoted 13 lines
env is allocated in
cpu_arm_init()withg_malloc0(), so free withg_free().Cc Peter Maydell <[email protected]>Signed-off-by Andreas Färber <[email protected]>--- target-arm/helper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)target-arm/helper.c +0
-0
target-arm/helper.c static uint32_t cpu_arm_find_by_name(const char *name) · line 477
Quoted 8 lines
target-arm/helper.c +1
-1@@ -471,7 +471,7 @@ static uint32_t cpu_arm_find_by_name(const char *name)void cpu_arm_close (CPUARMState *env) { -free (env); +g_free (env); }uint32_t cpsr_read (CPUARMState *env)
Ping! Didn't see this in the pull request... Should it go through qemu-trivial instead?
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746, AG Nürnberg
Quoted 21 lines · Andreas Färber
Am 10.10.2011 14:52, schrieb Andreas Färber:
Quoted 20 lines
env is allocated in
cpu_arm_init()withg_malloc0(), so free withg_free().Cc Peter Maydell <[email protected]>Signed-off-by Andreas Färber <[email protected]>---
target-arm/helper.c | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)target-arm/helper.c +1
-1@@ -471,7 +471,7 @@ static uint32_t cpu_arm_find_by_name(const char *name) void cpu_arm_close(CPUARMState *env) { - free(env); + g_free(env); }
Quoted 4 lines
target-arm/helper.c static uint32_t cpu_arm_find_by_name(const char *name) · line 477
Quoted 1 line
target-arm/helper.c +0
-0uint32_t cpsr_read(CPUARMState *env)Ping! Didn't see this in the pull request... Should it go through qemu-trivial instead?
Rats, missed that one. I guess I'd better redo the pullreq.
-- PMM