[vlc-commits] audioscrobbler: fix object leak in error path

Rafaël Carré git at videolan.org
Mon Aug 1 02:42:08 CEST 2011


vlc/vlc-1.1 | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Sun Jul 31 17:12:47 2011 -0400| [9507795a67c86de9e15a58e694219e38d812ab52] | committer: Rafaël Carré

audioscrobbler: fix object leak in error path
(cherry picked from commit ae3390dc8dc90eab07ef8fff8218939f01aafb60)

Signed-off-by: Rafaël Carré <rafael.carre at gmail.com>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=9507795a67c86de9e15a58e694219e38d812ab52
---

 modules/misc/audioscrobbler.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/misc/audioscrobbler.c b/modules/misc/audioscrobbler.c
index 9b18f1d..6815da9 100644
--- a/modules/misc/audioscrobbler.c
+++ b/modules/misc/audioscrobbler.c
@@ -940,7 +940,10 @@ static int ReadMetaData( intf_thread_t *p_this )
 
     p_item = input_GetItem( p_input );
     if( !p_item )
+    {
+        vlc_object_release( p_input );
         return VLC_SUCCESS;
+    }
 
     char *psz_meta;
 #define ALLOC_ITEM_META( a, b ) \



More information about the vlc-commits mailing list