Fix mismatching allocation and deallocation
authorStefan Weil <weil@mail.berlios.de>
Sun, 2 Oct 2011 16:53:09 +0000 (18:53 +0200)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Wed, 5 Oct 2011 08:23:00 +0000 (09:23 +0100)
This error was reported by cppcheck.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
console.c

index 6dfcc47..e43de92 100644 (file)
--- a/console.c
+++ b/console.c
@@ -1538,7 +1538,7 @@ int text_console_init(QemuOpts *opts, CharDriverState **_chr)
     }
 
     if (!s) {
-        free(chr);
+        g_free(chr);
         return -EBUSY;
     }