diff mbox

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

Message ID 1342383911-6094-7-git-send-email-minyard@acm.org
State New
Headers show

Commit Message

Corey Minyard July 15, 2012, 8:25 p.m. UTC
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(-)
diff mbox

Patch

diff --git a/qemu-char.c b/qemu-char.c
index 3d4302d..8fbc704 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -1946,7 +1946,6 @@  static void win_stdio_close(CharDriverState *chr)
     }
 
     g_free(chr->opaque);
-    g_free(chr);
     stdio_nb_clients--;
 }