[vlc-devel] [PATCH 1/2] control: dbus: fix error path

Alexandre Janniaux ajanni at videolabs.io
Sat Apr 4 18:33:27 CEST 2020


The error path was shifted one label too soon, meaning that object that
couldn't be created got destroyed too.
---
 modules/control/dbus/dbus.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/control/dbus/dbus.c b/modules/control/dbus/dbus.c
index e55058a7c0..b497be4656 100644
--- a/modules/control/dbus/dbus.c
+++ b/modules/control/dbus/dbus.c
@@ -328,14 +328,14 @@ static int Open( vlc_object_t *p_this )
 
 late_failure:
     vlc_playlist_Lock(playlist);
+    vlc_player_vout_RemoveListener(player, p_sys->player_vout_listener);
 player_vout_listener_failure:
-    vlc_player_vout_RemoveListener(player, p_sys->player_vout_listener);
+    vlc_player_aout_RemoveListener(player, p_sys->player_aout_listener);
 player_aout_listener_failure:
-    vlc_player_aout_RemoveListener(player, p_sys->player_aout_listener);
+    vlc_player_RemoveListener(player, p_sys->player_listener);
 player_listener_failure:
-    vlc_player_RemoveListener(player, p_sys->player_listener);
+    vlc_playlist_RemoveListener(playlist, p_sys->playlist_listener);
 playlist_listener_failure:
-    vlc_playlist_RemoveListener(playlist, p_sys->playlist_listener);
     vlc_playlist_Unlock(playlist);
 
     var_Destroy(vlc, "dbus-mpris-name");
-- 
2.26.0



More information about the vlc-devel mailing list