[Spice-devel] [spice-gtk 2/2] Free display_cache in cache_free()

Christophe Fergeau cfergeau at redhat.com
Mon Oct 12 07:38:22 PDT 2015


Otherwise it will be leaked.
---
 src/spice-channel-cache.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/spice-channel-cache.h b/src/spice-channel-cache.h
index 238ceb7..e609a67 100644
--- a/src/spice-channel-cache.h
+++ b/src/spice-channel-cache.h
@@ -131,6 +131,7 @@ static inline void cache_clear(display_cache *cache)
 static inline void cache_free(display_cache *cache)
 {
     g_hash_table_unref(cache->table);
+    g_slice_free(display_cache, cache);
 }
 
 G_END_DECLS
-- 
2.5.0



More information about the Spice-devel mailing list