diff mbox

Fix mismatching allocation and deallocation

Message ID 1317574389-15007-1-git-send-email-weil@mail.berlios.de
State Accepted
Headers show

Commit Message

Stefan Weil Oct. 2, 2011, 4:53 p.m. UTC
This error was reported by cppcheck.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 console.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Stefan Hajnoczi Oct. 5, 2011, 8:23 a.m. UTC | #1
On Sun, Oct 02, 2011 at 06:53:09PM +0200, Stefan Weil wrote:
> This error was reported by cppcheck.
> 
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
>  console.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Thanks, applied to the trivial patches tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches

Stefan
diff mbox

Patch

diff --git a/console.c b/console.c
index 6dfcc47..e43de92 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;
     }