diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2015-10-12 15:36:58 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2015-10-14 10:07:36 +0200 |
commit | 93182f22a9b807a3ee5d663f7ff7b9fb0ce215a1 (patch) | |
tree | 7a21ce0f22db332dc076a1ae659493e98bbb2baf | |
parent | 13662bb367692817f88f1116476197fe32defac6 (diff) | |
download | spice-gtk-93182f22a9b807a3ee5d663f7ff7b9fb0ce215a1.tar.gz spice-gtk-93182f22a9b807a3ee5d663f7ff7b9fb0ce215a1.tar.xz spice-gtk-93182f22a9b807a3ee5d663f7ff7b9fb0ce215a1.zip |
Free display_cache in cache_unref
Otherwise it will be leaked. There is no cache_ref function, or helper
increasing a refcount/taking a reference so cache_unref really is a
cache_free method.
This fixes:
==27687== 64 bytes in 4 blocks are definitely lost in loss record 250 of 435
==27687== at 0x4C28C50: malloc (vg_replace_malloc.c:299)
==27687== by 0xA6AF058: g_malloc (gmem.c:94)
==27687== by 0xA6C5982: g_slice_alloc (gslice.c:1007)
==27687== by 0x40F112: cache_new (spice-channel-cache.h:54)
==27687== by 0x40F112: cache_image_new (spice-channel-cache.h:64)
==27687== by 0x40F112: spice_session_init (spice-session.c:294)
==27687== by 0xA239B4A: g_type_create_instance (gtype.c:1870)
==27687== by 0xA21C31A: g_object_new_internal (gobject.c:1779)
==27687== by 0xA21DB10: g_object_newv (gobject.c:1926)
==27687== by 0xA21E3FB: g_object_new (gobject.c:1619)
==27687== by 0x40FF4D: spice_session_new (spice-session.c:1479)
==27687== by 0x40E678: test_session_uri (session.c:35)
==27687== by 0xA6CE47A: test_case_run (gtestutils.c:2158)
==27687== by 0xA6CE47A: g_test_run_suite_internal (gtestutils.c:2241)
==27687== by 0xA6CE642: g_test_run_suite_internal (gtestutils.c:2253)
-rw-r--r-- | src/spice-channel-cache.h | 1 |
1 files changed, 1 insertions, 0 deletions
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 |