[Spice-devel] [PATCH spice-server v2 17/23] worker: Use GLib memory functions

Frediano Ziglio fziglio at redhat.com
Wed Sep 20 07:51:10 UTC 2017


Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/cursor-channel.c | 2 +-
 server/red-worker.c     | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/server/cursor-channel.c b/server/cursor-channel.c
index 7fab4c8c7..9ae76090f 100644
--- a/server/cursor-channel.c
+++ b/server/cursor-channel.c
@@ -74,7 +74,7 @@ static void cursor_pipe_item_free(RedPipeItem *base)
 
     cursor_cmd = pipe_item->red_cursor;
     red_put_cursor_cmd(cursor_cmd);
-    free(cursor_cmd);
+    g_free(cursor_cmd);
 
     g_free(pipe_item);
 }
diff --git a/server/red-worker.c b/server/red-worker.c
index 8a63fde2a..466a3474b 100644
--- a/server/red-worker.c
+++ b/server/red-worker.c
@@ -100,16 +100,16 @@ void red_drawable_unref(RedDrawable *red_drawable)
     }
     red_qxl_release_resource(red_drawable->qxl, red_drawable->release_info_ext);
     red_put_drawable(red_drawable);
-    free(red_drawable);
+    g_free(red_drawable);
 }
 
 static gboolean red_process_cursor_cmd(RedWorker *worker, const QXLCommandExt *ext)
 {
     RedCursorCmd *cursor_cmd;
 
-    cursor_cmd = spice_new0(RedCursorCmd, 1);
+    cursor_cmd = g_new0(RedCursorCmd, 1);
     if (!red_get_cursor_cmd(&worker->mem_slots, ext->group_id, cursor_cmd, ext->cmd.data)) {
-        free(cursor_cmd);
+        g_free(cursor_cmd);
         return FALSE;
     }
     red_qxl_release_resource(worker->qxl, cursor_cmd->release_info_ext);
@@ -161,7 +161,7 @@ static int red_process_cursor(RedWorker *worker, int *ring_is_empty)
 
 static RedDrawable *red_drawable_new(QXLInstance *qxl)
 {
-    RedDrawable * red = spice_new0(RedDrawable, 1);
+    RedDrawable * red = g_new0(RedDrawable, 1);
 
     red->refs = 1;
     red->qxl = qxl;
-- 
2.13.5



More information about the Spice-devel mailing list