mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
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/5398>
This commit is contained in:
parent
a7353d8859
commit
47dbdea469
1 changed files with 6 additions and 2 deletions
|
@ -96,6 +96,7 @@
|
||||||
|
|
||||||
#define GST_TYPE_SOUP_SESSION (gst_soup_session_get_type())
|
#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(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);
|
GType gst_soup_session_get_type (void);
|
||||||
|
|
||||||
|
@ -139,8 +140,9 @@ gst_soup_session_finalize (GObject * obj)
|
||||||
GSource *src;
|
GSource *src;
|
||||||
|
|
||||||
/* handle disposing of failure cases */
|
/* handle disposing of failure cases */
|
||||||
if (!sess->loop)
|
if (!sess->loop) {
|
||||||
return;
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
src = g_idle_source_new ();
|
src = g_idle_source_new ();
|
||||||
|
|
||||||
|
@ -152,6 +154,8 @@ gst_soup_session_finalize (GObject * obj)
|
||||||
g_assert (!g_main_context_is_owner (g_main_loop_get_context (sess->loop)));
|
g_assert (!g_main_context_is_owner (g_main_loop_get_context (sess->loop)));
|
||||||
g_thread_join (sess->thread);
|
g_thread_join (sess->thread);
|
||||||
g_main_loop_unref (sess->loop);
|
g_main_loop_unref (sess->loop);
|
||||||
|
cleanup:
|
||||||
|
G_OBJECT_CLASS (session_parent_class)->finalize (obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue