summaryrefslogtreecommitdiff
path: root/ext/wpe/WPEThreadedView.cpp
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>2021-05-06 18:37:45 +0200
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-05-07 16:01:49 +0000
commitc9a04ca979d004114f7df2ceb18bd74d1b191df8 (patch)
treedaaf23a50b708464b4e088cd0c7864e9bee4a280 /ext/wpe/WPEThreadedView.cpp
parent950d5eedf940776e7dfe27a0e7fd34ce4fa163a8 (diff)
downloadgstreamer-plugins-bad-c9a04ca979d004114f7df2ceb18bd74d1b191df8.tar.gz
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>
Diffstat (limited to 'ext/wpe/WPEThreadedView.cpp')
-rw-r--r--ext/wpe/WPEThreadedView.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/wpe/WPEThreadedView.cpp b/ext/wpe/WPEThreadedView.cpp
index 051d103d1..f4588e5b3 100644
--- a/ext/wpe/WPEThreadedView.cpp
+++ b/ext/wpe/WPEThreadedView.cpp
@@ -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()