Commit dd090fbc authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

udp: memory leak

(cherry picked from commit 00b9dd8cbcd4ccd466a28d4f3fa2b7b605ca6276)
parent 13d9684a
......@@ -90,12 +90,6 @@ static void* ThreadRead( void *data );
static int Open( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
char *psz_name = strdup( p_access->psz_location );
char *psz_parser;
const char *psz_server_addr, *psz_bind_addr = "";
int i_bind_port = 1234, i_server_port = 0;
access_sys_t *sys = malloc( sizeof( *sys ) );
if( unlikely( sys == NULL ) )
return VLC_ENOMEM;
......@@ -106,6 +100,14 @@ static int Open( vlc_object_t *p_this )
access_InitFields( p_access );
ACCESS_SET_CALLBACKS( NULL, BlockUDP, Control, NULL );
char *psz_name = strdup( p_access->psz_location );
char *psz_parser;
const char *psz_server_addr, *psz_bind_addr = "";
int i_bind_port = 1234, i_server_port = 0;
if( unlikely(psz_name == NULL) )
goto error;
/* Parse psz_name syntax :
* [serveraddr[:serverport]][@[bindaddr]:[bindport]] */
psz_parser = strchr( psz_name, '@' );
......
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