[vlc-commits] oldrc: fix reference leak

Rémi Denis-Courmont git at videolan.org
Sun May 14 18:38:49 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 14 17:00:29 2017 +0300| [5d874075a1fb6f187da17a6fe3a6ec8d16a1918d] | committer: Rémi Denis-Courmont

oldrc: fix reference leak

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

 modules/control/oldrc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/control/oldrc.c b/modules/control/oldrc.c
index 37eea02a0f..4f085e4fcc 100644
--- a/modules/control/oldrc.c
+++ b/modules/control/oldrc.c
@@ -1313,8 +1313,9 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
         if( p_item )
         {
             msg_rc( "trying to enqueue %s to playlist", newval.psz_string );
-            if( playlist_AddInput( p_playlist, p_item,
-                                   0, true ) != VLC_SUCCESS )
+            int ret =  playlist_AddInput( p_playlist, p_item, 0, true );
+            input_item_Release( p_item );
+            if( ret != VLC_SUCCESS )
             {
                 return VLC_EGENERIC;
             }



More information about the vlc-commits mailing list