[vlc-commits] control/oldrc: remove abort() usage
Thomas Guillem
git at videolan.org
Fri Sep 28 16:46:00 CEST 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Sep 28 16:45:04 2018 +0200| [130d97d7cc8c60b0e09421098d846a278d706a7e] | committer: Thomas Guillem
control/oldrc: remove abort() usage
And add a goto error since a new check will be needed with the future
player/playlist.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=130d97d7cc8c60b0e09421098d846a278d706a7e
---
modules/control/oldrc.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/control/oldrc.c b/modules/control/oldrc.c
index 8c43b3e7bc..68af8509bf 100644
--- a/modules/control/oldrc.c
+++ b/modules/control/oldrc.c
@@ -364,13 +364,20 @@ static int Activate( vlc_object_t *p_this )
#endif
if( vlc_clone( &p_sys->thread, Run, p_intf, VLC_THREAD_PRIORITY_LOW ) )
- abort();
+ goto error;
msg_rc( "%s", _("Remote control interface initialized. Type `help' for help.") );
/* Listen to audio volume updates */
var_AddCallback( p_sys->p_playlist, "volume", VolumeChanged, p_intf );
return VLC_SUCCESS;
+
+error:
+ net_ListenClose( pi_socket );
+ free( psz_unix_path );
+ vlc_mutex_destroy( &p_sys->status_lock );
+ free( p_sys );
+ return VLC_EGENERIC;
}
/*****************************************************************************
More information about the vlc-commits
mailing list