[Spice-devel] [PATCH spice-server v2 20/23] image-cache: Use GLib memory functions

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


Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/image-cache.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/image-cache.c b/server/image-cache.c
index bd888bef2..3493ba1fc 100644
--- a/server/image-cache.c
+++ b/server/image-cache.c
@@ -64,7 +64,7 @@ static void image_cache_remove(ImageCache *cache, ImageCacheItem *item)
     }
     ring_remove(&item->lru_link);
     pixman_image_unref(item->image);
-    free(item);
+    g_free(item);
 #ifndef IMAGE_CACHE_AGE
     cache->num_items--;
 #endif
@@ -86,7 +86,7 @@ static void image_cache_put(SpiceImageCache *spice_cache, uint64_t id, pixman_im
     }
 #endif
 
-    item = spice_new(ImageCacheItem, 1);
+    item = g_new(ImageCacheItem, 1);
     item->id = id;
 #ifdef IMAGE_CACHE_AGE
     item->age = cache->age;
-- 
2.13.5



More information about the Spice-devel mailing list