Commit ce9b3ea8 authored by Rémi Duraffort's avatar Rémi Duraffort

Fix potential memleak (+cleaning).

parent 4d62902d
...@@ -102,10 +102,14 @@ static int Open( vlc_object_t *p_this ) ...@@ -102,10 +102,14 @@ static int Open( vlc_object_t *p_this )
*psz_parser++ = '\0'; *psz_parser++ = '\0';
/* Init p_access */ /* Init p_access */
access_InitFields( p_access ); \ access_InitFields( p_access );
ACCESS_SET_CALLBACKS( Read, NULL, Control, NULL ); \ ACCESS_SET_CALLBACKS( Read, NULL, Control, NULL );
MALLOC_ERR( p_access->p_sys, access_sys_t ); \ p_sys = p_access->p_sys = calloc( 1, sizeof( access_sys_t ) );
p_sys = p_access->p_sys; memset( p_sys, 0, sizeof( access_sys_t ) ); if( !p_sys )
{
free( psz_dup );
return VLC_ENOMEM;
}
p_sys->fd = net_ConnectTCP( p_access, psz_dup, atoi( psz_parser ) ); p_sys->fd = net_ConnectTCP( p_access, psz_dup, atoi( psz_parser ) );
free( psz_dup ); free( psz_dup );
......
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