The set location (in two places) and loaded bytes were not freed when
the element is destroyed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2222>
gst_wpe_src_configure_web_view(src, webkit.view);
- const gchar* location;
+ gchar* location;
gboolean drawBackground = TRUE;
g_object_get(src, "location", &location, "draw-background", &drawBackground, nullptr);
setDrawBackground(drawBackground);
- if (location)
+ if (location) {
loadUriUnlocked(location);
+ g_free(location);
+ }
}
WPEView::~WPEView()
{
GstWpeSrc *src = GST_WPE_SRC (object);
+ g_free (src->location);
+ g_clear_pointer (&src->bytes, g_bytes_unref);
g_mutex_clear (&src->lock);
G_OBJECT_CLASS (parent_class)->finalize (object);