configure_mode_setting() keeps a ref on tmp_kmsmem which is released in
gst_kms_sink_show_frame().
But if for some reason configure_mode_setting() is re-called before
showing a frame or if none is showed this memory was leaked.
if (err)
goto modesetting_failed;
+ g_clear_pointer (&self->tmp_kmsmem, gst_memory_unref);
self->tmp_kmsmem = (GstMemory *) kmsmem;
ret = TRUE;
gst_poll_free (sink->poll);
g_clear_pointer (&sink->connector_props, gst_structure_free);
g_clear_pointer (&sink->plane_props, gst_structure_free);
+ g_clear_pointer (&sink->tmp_kmsmem, gst_memory_unref);
G_OBJECT_CLASS (parent_class)->finalize (object);
}