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>
This commit is contained in:
Albert Sjölund 2023-09-27 08:48:03 +02:00 committed by GStreamer Marge Bot
parent c7f7c8e346
commit c53376cbfc

View file

@ -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