p_stream->p_sys->p_session = p_session;
}
vlc_UrlClean( &url );
+
+ if( p_method->psz_address) free( p_method->psz_address );
+ free( p_method );
}
/* *** Register with slp *** */
if( psz_mux ) free( psz_mux );
if( psz_url ) free( psz_url );
+
return VLC_SUCCESS;
}
if( p_sys->p_session != NULL )
{
sout_AnnounceUnRegister( p_stream->p_sout, p_sys->p_session );
+ sout_AnnounceSessionDestroy( p_sys->p_session );
}
#ifdef HAVE_SLP_H
{
/* IPv4 */
p_method->psz_address = (char*)malloc( 15*sizeof(char) );
- sprintf(p_method->psz_address, SAP_IPV4_ADDR );
+ snprintf(p_method->psz_address, 15, SAP_IPV4_ADDR );
}
}
msg_Dbg( p_sap, "using SAP address: %s",p_method->psz_address);
memcpy( p_sap_session->psz_data+i_header_size, p_sap_session->psz_sdp,
strlen( p_sap_session->psz_sdp) );
+ free( psz_head );
+
/* Enqueue the announce */
INSERT_ELEM( p_sap->pp_sessions,
p_sap->i_sessions,
/* XXX: Dequeue the address too if it is not used anymore
* TODO: - address refcount
- - send a SAP deletion packet */
+ - send a SAP deletion packet */
msg_Dbg( p_sap,"%i announces remaining", p_sap->i_sessions );