Patchwork [2/8] Fix qemu_free use in baum.c

login
register
mail settings
Submitter Jean-Christophe DUBOIS
Date Nov. 15, 2009, 6:18 p.m.
Message ID <1258309100-29591-2-git-send-email-jcd@tribudubois.net>
Download mbox | patch
Permalink /patch/38465/
State New
Headers show

Comments

Jean-Christophe DUBOIS - Nov. 15, 2009, 6:18 p.m.
baum.c is using free() instead of qemu_free().
Fix it.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
---
 hw/baum.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/hw/baum.c b/hw/baum.c
index 8a12985..10c4302 100644
--- a/hw/baum.c
+++ b/hw/baum.c
@@ -559,7 +559,7 @@  static void baum_chr_read(void *opaque)
     if (ret == -1 && (brlapi_errno != BRLAPI_ERROR_LIBCERR || errno != EINTR)) {
         brlapi_perror("baum: brlapi_readKey");
         brlapi__closeConnection(baum->brlapi);
-        free(baum->brlapi);
+        qemu_free(baum->brlapi);
         baum->brlapi = NULL;
     }
 }
@@ -622,8 +622,8 @@  fail:
     qemu_free_timer(baum->cellCount_timer);
     brlapi__closeConnection(handle);
 fail_handle:
-    free(handle);
-    free(chr);
-    free(baum);
+    qemu_free(handle);
+    qemu_free(chr);
+    qemu_free(baum);
     return NULL;
 }