p_sd->p_sys = p_sys = (services_discovery_sys_t *)malloc(
sizeof( services_discovery_sys_t ) );
- if( p_sd->p_sys == NULL )
- {
- msg_Err( p_sd, "out of memory" );
- return VLC_EGENERIC;
- }
+
+ if( !p_sys )
+ return VLC_ENOMEM;
memset( p_sys, 0, sizeof(*p_sys) );
services_discovery_t *p_sd = ( services_discovery_t* )p_this;
services_discovery_sys_t *p_sys = malloc(
sizeof( services_discovery_sys_t ) );
+ if( !p_sys )
+ return VLC_ENOMEM;
p_sys->i_urls = 0;
p_sys->ppsz_urls = NULL;
services_discovery_t *p_sd = ( services_discovery_t* )p_this;
services_discovery_sys_t *p_sys = (services_discovery_sys_t *)
malloc( sizeof( services_discovery_sys_t ) );
+ if( !p_sys )
+ return VLC_ENOMEM;
p_sys->i_timeout = var_CreateGetInteger( p_sd, "sap-timeout" );