notify: call free() only when needed

This commit is contained in:
Rémi Denis-Courmont 2020-05-05 18:45:45 +03:00
parent 0c2b5dabb4
commit e4e8b040c8
1 changed files with 1 additions and 2 deletions

View File

@ -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 '&' because '&' is a keyword of
* notification-daemon parser */
const int i_len = strlen( psz_tmp );