From 54efc9816659ddf92b4e28264776810d937e3f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Tue, 25 Nov 2025 20:24:13 +0100 Subject: [PATCH] clapper: Fix media items leak when parsing URI list Unlike other array containers, GListStore append function refs object internally, so unref afterwards is needed. --- src/lib/clapper/gst/clapper-playlist-demux.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/clapper/gst/clapper-playlist-demux.c b/src/lib/clapper/gst/clapper-playlist-demux.c index 0c7afac4..7a668bb0 100644 --- a/src/lib/clapper/gst/clapper-playlist-demux.c +++ b/src/lib/clapper/gst/clapper-playlist-demux.c @@ -260,8 +260,10 @@ _parse_uri_list (ClapperPlaylistDemux *self, GUri *uri, GstBuffer *buffer, break; } - if (G_LIKELY (item != NULL)) + if (G_LIKELY (item != NULL)) { g_list_store_append (playlist, (GObject *) item); + gst_object_unref (item); + } /* Advance to the next line */ ptr = nl ? (nl + 1) : end;