netclientclock: Free data after removing it from the list
authorSebastian Dröge <sebastian@centricular.com>
Fri, 15 Jan 2016 08:02:42 +0000 (09:02 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Fri, 15 Jan 2016 08:02:42 +0000 (09:02 +0100)
Does not matter here but makes Coverity more happy. It can't
know that g_list_remove() only looks at the pointer value but
does not dereference it.

CID 1348454

libs/gst/net/gstnetclientclock.c

index 245fb78..e9777ba 100644 (file)
@@ -1115,8 +1115,8 @@ remove_clock_cache (GstClock * clock, GstClockTime time, GstClockID id,
   if (!cache->clocks) {
     gst_clock_id_unref (cache->remove_id);
     gst_object_unref (cache->clock);
-    g_free (cache);
     clocks = g_list_remove (clocks, cache);
+    g_free (cache);
   }
   G_UNLOCK (clocks_lock);