mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
wpe: Properly free property fields
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>
This commit is contained in:
parent
950d5eedf9
commit
c9a04ca979
2 changed files with 6 additions and 2 deletions
|
@ -294,12 +294,14 @@ WPEView::WPEView(WebKitWebContext* web_context, GstWpeSrc* src, GstGLContext* co
|
|||
|
||||
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()
|
||||
|
|
|
@ -666,6 +666,8 @@ gst_wpe_src_finalize (GObject * object)
|
|||
{
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue