summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2017-11-10 23:17:29 +1100
committerOlivier CrĂȘte <olivier.crete@collabora.com>2018-05-05 13:42:24 +0200
commit761854febad29224c194fabb76c24f2701099c2f (patch)
tree8d5d5db081d1bd0ab9948cebb96bda94467bc591
parent690479a2fc85204db79115782072520d70e8ec53 (diff)
downloadgupnp-igd-761854febad29224c194fabb76c24f2701099c2f.tar.gz
free GStaticMutex in AddRemoveData
Fixes a memory leak reported by valgrind 128 bytes in 16 blocks are definitely lost in loss record 6,923 of 7,784 at 0x4C2CE5F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x7AEAEB8: g_malloc (gmem.c:94) by 0x7B02A25: g_slice_alloc (gslice.c:1025) by 0x7AB6D9A: g_mutex_new (gthread-deprecated.c:1461) by 0x7AB70B4: g_static_mutex_get_mutex_impl (gthread-deprecated.c:524) by 0xBE6E74F: ??? (in /usr/lib/libgupnp-igd-1.0.so.4.2.0) by 0x7AE5784: g_main_dispatch (gmain.c:3182) by 0x7AE5784: g_main_context_dispatch (gmain.c:3847) by 0x7AE5B4F: g_main_context_iterate.isra.30 (gmain.c:3920) by 0x7AE5E61: g_main_loop_run (gmain.c:4116) by 0xBE6ED7D: ??? (in /usr/lib/libgupnp-igd-1.0.so.4.2.0) by 0x7B0D2A4: g_thread_proxy (gthread.c:784) by 0x8028089: start_thread (in /usr/lib/libpthread-2.26.so) by 0x833524E: clone (in /usr/lib/libc-2.26.so) https://bugzilla.gnome.org/show_bug.cgi?id=790165
-rw-r--r--libgupnp-igd/gupnp-simple-igd-thread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libgupnp-igd/gupnp-simple-igd-thread.c b/libgupnp-igd/gupnp-simple-igd-thread.c
index 8212f76..f38e9b7 100644
--- a/libgupnp-igd/gupnp-simple-igd-thread.c
+++ b/libgupnp-igd/gupnp-simple-igd-thread.c
@@ -450,6 +450,8 @@ free_add_remove_port_data (gpointer user_data)
g_free (data->local_ip);
g_free (data->description);
+ g_static_mutex_free (&data->mutex);
+
g_slice_free (struct AddRemovePortData, data);
}