diff options
author | Albert Sjölund <alberts@axis.com> | 2023-09-27 08:48:03 +0200 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2023-09-27 11:27:02 +0000 |
commit | c53376cbfca113797aa80dc2b7cc21cd1497c616 (patch) | |
tree | eeec0ad118f58f04fea9bef66bd8ee2c63c4f792 /subprojects/gst-plugins-good | |
parent | c7f7c8e34662415f2342355465642ae4e0004c97 (diff) |
souphttpsrc: Chain finalize call to parent
GstSoupSession finalize does not chain parent finalize,
causing it to leak memory, shown under g freeze notify.
In finalize method, ensure all branches call to parent
finalize.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5402>
Diffstat (limited to 'subprojects/gst-plugins-good')
-rw-r--r-- | subprojects/gst-plugins-good/ext/soup/gstsouphttpsrc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/subprojects/gst-plugins-good/ext/soup/gstsouphttpsrc.c b/subprojects/gst-plugins-good/ext/soup/gstsouphttpsrc.c index aa5097967a..dc8b86a3cf 100644 --- a/subprojects/gst-plugins-good/ext/soup/gstsouphttpsrc.c +++ b/subprojects/gst-plugins-good/ext/soup/gstsouphttpsrc.c @@ -94,6 +94,7 @@ #define GST_TYPE_SOUP_SESSION (gst_soup_session_get_type()) #define GST_SOUP_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SOUP_SESSION, GstSoupSession)) +#define gst_soup_session_parent_class session_parent_class GType gst_soup_session_get_type (void); @@ -137,8 +138,9 @@ gst_soup_session_finalize (GObject * obj) GSource *src; /* handle disposing of failure cases */ - if (!sess->loop) - return; + if (!sess->loop) { + goto cleanup; + } src = g_idle_source_new (); @@ -150,6 +152,8 @@ gst_soup_session_finalize (GObject * obj) g_assert (!g_main_context_is_owner (g_main_loop_get_context (sess->loop))); g_thread_join (sess->thread); g_main_loop_unref (sess->loop); +cleanup: + G_OBJECT_CLASS (session_parent_class)->finalize (obj); } static void |