[vlc-devel] commit: Fixed potential segfault in notify. (Laurent Aimar )

git version control git at videolan.org
Wed Feb 25 21:23:12 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Feb 25 21:03:48 2009 +0100| [10ba29147acb715e19957ce945354e81bfb9f63e] | committer: Laurent Aimar 

Fixed potential segfault in notify.

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

 modules/misc/notify/notify.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/misc/notify/notify.c b/modules/misc/notify/notify.c
index a72b1d1..dce8617 100644
--- a/modules/misc/notify/notify.c
+++ b/modules/misc/notify/notify.c
@@ -201,8 +201,6 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
         psz_album = NULL;
     }
 
-    vlc_object_release( p_input );
-
     if( psz_artist && psz_album )
         snprintf( psz_tmp, MAX_LENGTH, "<b>%s</b>\n%s\n[%s]",
                   psz_title, psz_artist, psz_album );
@@ -220,6 +218,8 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
     GError *p_error = NULL;
 
     psz_arturl = input_item_GetArtURL( p_input_item );
+    vlc_object_release( p_input );
+
     if( psz_arturl && !strncmp( psz_arturl, "file://", 7 ) &&
                 strlen( psz_arturl ) > 7 )
     { /* scale the art to show it in notify popup */




More information about the vlc-devel mailing list