diff options
| author | Stefan Weil <sw@weilnetz.de> | 2011-10-07 07:38:46 +0200 |
|---|---|---|
| committer | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2011-10-14 14:38:13 +0100 |
| commit | 2e02e18ba7e1b22289876166e6ed0c5f848ac20a (patch) | |
| tree | 56160c88b4434c702044336d8ab4a9b052598414 | |
| parent | 3a846906c9c31e01efc0ce0cde39124ec9acb252 (diff) | |
| download | focaccia-qemu-2e02e18ba7e1b22289876166e6ed0c5f848ac20a.tar.gz focaccia-qemu-2e02e18ba7e1b22289876166e6ed0c5f848ac20a.zip | |
qemu-char: Fix use of free() instead of g_free()
cppcheck reported these errors: qemu-char.c:1667: error: Mismatching allocation and deallocation: s qemu-char.c:1668: error: Mismatching allocation and deallocation: chr qemu-char.c:1769: error: Mismatching allocation and deallocation: s qemu-char.c:1770: error: Mismatching allocation and deallocation: chr Tested-by: Dongxu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| -rw-r--r-- | qemu-char.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qemu-char.c b/qemu-char.c index 8bdbcfdad2..fb9e058961 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1664,8 +1664,8 @@ static int qemu_chr_open_win(QemuOpts *opts, CharDriverState **_chr) chr->chr_close = win_chr_close; if (win_chr_init(chr, filename) < 0) { - free(s); - free(chr); + g_free(s); + g_free(chr); return -EIO; } qemu_chr_generic_open(chr); @@ -1766,8 +1766,8 @@ static int qemu_chr_open_win_pipe(QemuOpts *opts, CharDriverState **_chr) chr->chr_close = win_chr_close; if (win_chr_pipe_init(chr, filename) < 0) { - free(s); - free(chr); + g_free(s); + g_free(chr); return -EIO; } qemu_chr_generic_open(chr); |