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 df983d922ef8eadf4c408f779d6a857f6a7c24db..367fc2a93fb6b12f11e2b50da02d943c0e758e46 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);
 }