vlc | branch: master | Rémi Denis-Courmont <r...@remlab.net> | Tue May  5 
18:45:45 2020 +0300| [e4e8b040c8e42da1523cddaee5c3abe487880b5c] | committer: 
Rémi Denis-Courmont

notify: call free() only when needed

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

 modules/notify/notify.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/notify/notify.c b/modules/notify/notify.c
index 64017cc8f8..d2d2c110ca 100644
--- a/modules/notify/notify.c
+++ b/modules/notify/notify.c
@@ -239,6 +239,7 @@ static void on_current_media_changed(vlc_player_t *player,
         GError *p_error = NULL;
         pix = gdk_pixbuf_new_from_file_at_scale( psz_arturl,
                                                  72, 72, TRUE, &p_error );
+        free( psz_arturl );
     }
     else /* else we show state-of-the art logo */
     {
@@ -260,8 +261,6 @@ static void on_current_media_changed(vlc_player_t *player,
         }
     }
 
-    free( psz_arturl );
-
     /* we need to replace '&' with '&amp;' because '&' is a keyword of
      * notification-daemon parser */
     const int i_len = strlen( psz_tmp );

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to