]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Convert last qemu_free and qemu_malloc uses
authorBlue Swirl <blauwirbel@gmail.com>
Sun, 21 Aug 2011 18:42:08 +0000 (18:42 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 21 Aug 2011 18:42:08 +0000 (18:42 +0000)
7267c0947d7e8ae5dff7bafd932c3bc285f43e5c missed
a few cases, fix them.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
HACKING
coroutine-gthread.c
ui/cocoa.m

diff --git a/HACKING b/HACKING
index 5b4ae10654185a9c0d34d97b142266feb7411334..733eab2dacff10210a5e5140b096b4d91db33dec 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -80,7 +80,7 @@ APIs is not allowed in the QEMU codebase. Instead of these routines,
 use the replacement g_malloc/g_malloc0/g_realloc/g_free or
 qemu_vmalloc/qemu_memalign/qemu_vfree APIs.
 
-Please note that NULL check for the qemu_malloc result is redundant and
+Please note that NULL check for the g_malloc result is redundant and
 that g_malloc() call with zero size is not allowed.
 
 Memory allocated by qemu_vmalloc or qemu_memalign must be freed with
index b00e548b2d73fa2d945c0e68dc5ab42a3a3595b0..fdea27a106601c5ae0914462fc0ae077271865af 100644 (file)
@@ -117,7 +117,7 @@ Coroutine *qemu_coroutine_self(void)
     if (!co) {
         co = g_malloc0(sizeof(*co));
         co->runnable = true;
-        g_static_private_set(&coroutine_key, co, (GDestroyNotify)qemu_free);
+        g_static_private_set(&coroutine_key, co, (GDestroyNotify)g_free);
     }
 
     return &co->base;
index 515e684dd21e3a4fad27e8a5728d8aa4de3c1b3f..d9e4e3dcaa45ba40b10f35d3486c570ac80c47f0 100644 (file)
@@ -1004,15 +1004,15 @@ static void cocoa_refresh(DisplayState *ds)
 static void cocoa_cleanup(void)
 {
     COCOA_DEBUG("qemu_cocoa: cocoa_cleanup\n");
-       qemu_free(dcl);
+    g_free(dcl);
 }
 
 void cocoa_display_init(DisplayState *ds, int full_screen)
 {
     COCOA_DEBUG("qemu_cocoa: cocoa_display_init\n");
 
-       dcl = qemu_mallocz(sizeof(DisplayChangeListener));
-       
+    dcl = g_malloc0(sizeof(DisplayChangeListener));
+
     // register vga output callbacks
     dcl->dpy_update = cocoa_update;
     dcl->dpy_resize = cocoa_resize;