[vlc-commits] player: medialib: Fix leak on error

Hugo Beauzée-Luyssen git at videolan.org
Fri Sep 18 15:24:07 CEST 2020


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Sep 18 15:15:29 2020 +0200| [06b9f32242daa2679f0e666aba6ff0aac4771d2d] | committer: Hugo Beauzée-Luyssen

player: medialib: Fix leak on error

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=06b9f32242daa2679f0e666aba6ff0aac4771d2d
---

 src/player/medialib.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/player/medialib.c b/src/player/medialib.c
index 93d8414632..64c7bad0de 100644
--- a/src/player/medialib.c
+++ b/src/player/medialib.c
@@ -194,7 +194,10 @@ vlc_player_UpdateMLStates(vlc_player_t *player, struct vlc_player_input* input)
     if (media->i_type == VLC_ML_MEDIA_TYPE_UNKNOWN)
     {
         if (!vlc_player_UpdateMediaType(input, ml, media))
+        {
+            vlc_ml_release( media );
             return;
+        }
     }
     assert(media->i_type != VLC_ML_MEDIA_TYPE_UNKNOWN);
 



More information about the vlc-commits mailing list