Changeset 8ca4ff015be825831c28a8a2a8d15279de940fdb

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

[7179862ee5ec72a7d85a9ceb8ef818f609108704]

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

Check memory allocation

Files:

Legend:

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

    reb6f43e r8ca4ff0  
    102102    services_discovery_sys_t *p_sys  = malloc( 
    103103                                    sizeof( services_discovery_sys_t ) ); 
     104    if( !p_sys ) 
     105        return VLC_ENOMEM; 
    104106 
    105107#ifdef HAVE_HAL_1 
     
    203205    p_udi_entry = malloc( sizeof( struct udi_input_id_t ) ); 
    204206    if( !p_udi_entry ) 
    205     { 
    206         return; 
    207     } 
     207        return; 
     208    p_udi_entry->psz_udi = strdup( psz_device ); 
     209    if( !p_udi_entry->psz_udi ) 
     210        return; 
     211 
    208212    vlc_gc_incref( p_input ); 
    209213    p_udi_entry->p_item = p_input; 
    210     p_udi_entry->psz_udi = strdup( psz_device ); 
    211214    TAB_APPEND( p_sys->i_devices_number, p_sys->pp_devices, p_udi_entry ); 
    212215#endif