[PATCH spice-server v2 09/23] event-loop: Use GLib memory functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/event-loop.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/event-loop.c b/server/event-loop.c
index 7f2db0f68..582782e11 100644
--- a/server/event-loop.c
+++ b/server/event-loop.c
@@ -37,7 +37,7 @@ struct SpiceTimer {
 static SpiceTimer* timer_add(const SpiceCoreInterfaceInternal *iface,
                              SpiceTimerFunc func, void *opaque)
 {
-    SpiceTimer *timer = spice_malloc0(sizeof(SpiceTimer));
+    SpiceTimer *timer = g_new0(SpiceTimer, 1);
 
     timer->context = iface->main_context;
     timer->func = func;
@@ -84,7 +84,7 @@ static void timer_remove(const SpiceCoreInterfaceInternal *iface,
 {
     timer_cancel(iface, timer);
     spice_assert(timer->source == NULL);
-    free(timer);
+    g_free(timer);
 }
 
 struct SpiceWatch {
@@ -155,7 +155,7 @@ static SpiceWatch *watch_add(const SpiceCoreInterfaceInternal *iface,
     spice_return_val_if_fail(fd != -1, NULL);
     spice_return_val_if_fail(func != NULL, NULL);
 
-    watch = spice_malloc0(sizeof(SpiceWatch));
+    watch = g_new0(SpiceWatch, 1);
     watch->context = iface->main_context;
     watch->channel = g_io_channel_unix_new(fd);
     watch->func = func;
@@ -173,7 +173,7 @@ static void watch_remove(const SpiceCoreInterfaceInternal *iface,
     spice_assert(watch->source == NULL);
 
     g_io_channel_unref(watch->channel);
-    free(watch);
+    g_free(watch);
 }
 
 const SpiceCoreInterfaceInternal event_loop_core = {
-- 
2.13.5

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]