Commit 4308309a authored by Pierre Ynard's avatar Pierre Ynard Committed by Jean-Baptiste Kempf

sap: handle SAP_Add() errors

Fixes #5640
Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
(cherry picked from commit dbb19bb6)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent faeca22a
...@@ -92,7 +92,14 @@ sout_AnnounceRegisterSDP( vlc_object_t *obj, const char *psz_sdp, ...@@ -92,7 +92,14 @@ sout_AnnounceRegisterSDP( vlc_object_t *obj, const char *psz_sdp,
goto error; goto error;
msg_Dbg (obj, "adding SAP session"); msg_Dbg (obj, "adding SAP session");
SAP_Add (p_sap, p_session ); if (SAP_Add (p_sap, p_session))
{
vlc_mutex_lock (&sap_mutex);
vlc_object_release ((vlc_object_t *)p_sap);
vlc_mutex_unlock (&sap_mutex);
goto error;
}
return p_session; return p_session;
error: error:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment