allocator: Mark registered allocator for leak
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 18 Oct 2016 15:59:25 +0000 (11:59 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Mon, 24 Oct 2016 15:54:22 +0000 (11:54 -0400)
gst/gstallocator.c

index df983d9..367fc2a 100644 (file)
@@ -210,6 +210,8 @@ gst_allocator_register (const gchar * name, GstAllocator * allocator)
       allocator, name);
 
   g_rw_lock_writer_lock (&lock);
+  /* The ref will never be released */
+  GST_OBJECT_FLAG_SET (allocator, GST_OBJECT_FLAG_MAY_BE_LEAKED);
   g_hash_table_insert (allocators, (gpointer) name, (gpointer) allocator);
   g_rw_lock_writer_unlock (&lock);
 }