From 4ae3685ac4a3faad82d5474a6605317046d90dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 29 Jan 2022 12:56:22 +0200 Subject: [PATCH] soup: Don't store a strong reference to the logging object Otherwise this causes a reference cycle between the session, the logger and the logging object (i.e. the sink element or session wrapper). Part-of: --- subprojects/gst-plugins-good/ext/soup/gstsouputils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-good/ext/soup/gstsouputils.c b/subprojects/gst-plugins-good/ext/soup/gstsouputils.c index d732c1a5cc..4357cd22f4 100644 --- a/subprojects/gst-plugins-good/ext/soup/gstsouputils.c +++ b/subprojects/gst-plugins-good/ext/soup/gstsouputils.c @@ -90,8 +90,7 @@ gst_soup_util_log_setup (SoupSession * session, SoupLoggerLogLevel level, /* Create a new logger and set body_size_limit to -1 (no limit) */ logger = _soup_logger_new (level); - _soup_logger_set_printer (logger, gst_soup_util_log_printer_cb, - gst_object_ref (object), (GDestroyNotify) gst_object_unref); + _soup_logger_set_printer (logger, gst_soup_util_log_printer_cb, object, NULL); /* Attach logger to session */ _soup_session_add_feature (session, (SoupSessionFeature *) logger);