Changeset d51dba48f9065eba4c167d21fe5258807e0da43f

Show
Ignore:
Timestamp:
27/03/08 00:46:21 (6 months ago)
Author:
Rafaël Carré <funman@videolan.org>
git-committer:
Rafaël Carré <funman@videolan.org> 1206575181 +0100
git-parent:

[8ca4ff015be825831c28a8a2a8d15279de940fdb]

git-author:
Rafaël Carré <funman@videolan.org> 1206575090 +0100
Message:

Services discoveries: check memory allocation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/services_discovery/bonjour.c

    rac175b3 rd51dba4  
    271271    p_sd->p_sys = p_sys = (services_discovery_sys_t *)malloc( 
    272272        sizeof( services_discovery_sys_t ) ); 
    273     if( p_sd->p_sys == NULL ) 
    274     { 
    275         msg_Err( p_sd, "out of memory" ); 
    276         return VLC_EGENERIC; 
    277     } 
     273 
     274    if( !p_sys ) 
     275        return VLC_ENOMEM; 
    278276 
    279277    memset( p_sys, 0, sizeof(*p_sys) ); 
  • modules/services_discovery/podcast.c

    rc90b3db rd51dba4  
    107107    services_discovery_sys_t *p_sys  = malloc( 
    108108                                    sizeof( services_discovery_sys_t ) ); 
     109    if( !p_sys ) 
     110        return VLC_ENOMEM; 
    109111 
    110112    p_sys->i_urls = 0; 
  • modules/services_discovery/sap.c

    r50f3a30 rd51dba4  
    295295    services_discovery_sys_t *p_sys  = (services_discovery_sys_t *) 
    296296                                malloc( sizeof( services_discovery_sys_t ) ); 
     297    if( !p_sys ) 
     298        return VLC_ENOMEM; 
    297299 
    298300    p_sys->i_timeout = var_CreateGetInteger( p_sd, "sap-timeout" );