From dc2242c0ead0a6847532e556053b5b2249d865e4 Mon Sep 17 00:00:00 2001 From: Thomas Guillem Date: Wed, 17 May 2023 08:37:34 +0200 Subject: [PATCH] lib: media_list: fix leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Felix Paul Kühne --- lib/media_list_path.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/media_list_path.h b/lib/media_list_path.h index 77edbcf8f9..95e77fd7a0 100644 --- a/lib/media_list_path.h +++ b/lib/media_list_path.h @@ -126,8 +126,10 @@ get_path_rec( const libvlc_media_list_path_t path, libvlc_media_list_t * p_curre if( !p_md ) return NULL; - if( p_md == p_searched_md ) + if( p_md == p_searched_md ) { + libvlc_media_release( p_md ); return libvlc_media_list_path_copy_by_appending( path, i ); /* Found! */ + } libvlc_media_list_t * p_subitems = libvlc_media_subitems( p_md ); libvlc_media_release( p_md );