Patchwork [07/18] qemu-char: remove free of chr from win_stdio_close

login
register
mail settings
Submitter Corey Minyard
Date July 19, 2012, 6:53 p.m.
Message ID <1342724013-1633-8-git-send-email-minyard@acm.org>
Download mbox | patch
Permalink /patch/172044/
State New
Headers show

Comments

Corey Minyard - July 19, 2012, 6:53 p.m.
From: Corey Minyard <cminyard@mvista.com>

This will result in a double free on close, because it's freed
in qemu_chr_delete() right after calling the close function.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
---
 qemu-char.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Patch

diff --git a/qemu-char.c b/qemu-char.c
index d363319..6c3e61e 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -1949,7 +1949,6 @@  static void win_stdio_close(CharDriverState *chr)
     }
 
     g_free(chr->opaque);
-    g_free(chr);
     stdio_nb_clients--;
 }