From: Stefan Weil Date: Sun, 2 Oct 2011 16:53:09 +0000 (+0200) Subject: Fix mismatching allocation and deallocation X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5354d08312c1fdc752a498a9857e913a890c4e10;p=qemu.git Fix mismatching allocation and deallocation This error was reported by cppcheck. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- diff --git a/console.c b/console.c index 6dfcc47940..e43de92c00 100644 --- 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; }