Changeset 3df8219d70e452cfdd6631658202fb59da4e225f

Show
Ignore:
Timestamp:
01/06/08 11:13:57 (4 months ago)
Author:
Rémi Denis-Courmont <rdenis@simphalempin.com>
git-committer:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1212311637 +0300
git-parent:

[951d135f82db558748836d065ba440ab9128e9e4]

git-author:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1212311637 +0300
Message:

RC OSD: Fix NULL check after deref (CID 109)

(cherry picked from commit a2d82490555eb3271a77b4958bc8528091951901)

Conflicts:

modules/control/rc.c

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/control/rc.c

    r3561b9b r3df8219  
    19011901    intf_thread_t *p_intf = (intf_thread_t*)p_this; 
    19021902    playlist_t    *p_playlist = NULL; 
     1903    int i_error = VLC_SUCCESS; 
    19031904    vlc_value_t val; 
    1904     int i_error = VLC_EGENERIC; 
    19051905 
    19061906    if ( !*newval.psz_string ) 
     
    19081908        msg_rc( _("Please provide one of the following parameters:") ); 
    19091909        msg_rc( "[on|off|up|down|left|right|select]" ); 
    1910         return i_error
     1910        return VLC_EGENERIC
    19111911    } 
    19121912 
     
    19291929 
    19301930    val.psz_string = strdup( newval.psz_string ); 
     1931    if( !val.psz_string ) 
     1932        return VLC_ENOMEM; 
    19311933    if( !strcmp( val.psz_string, "on" ) || !strcmp( val.psz_string, "show" )) 
    19321934        osd_MenuShow( p_this ); 
    1933     else if( !strcmp( val.psz_string, "off" ) || !strcmp( val.psz_string, "hide" ) ) 
     1935    else if( !strcmp( val.psz_string, "off" ) 
     1936          || !strcmp( val.psz_string, "hide" ) ) 
    19341937        osd_MenuHide( p_this ); 
    19351938    else if( !strcmp( val.psz_string, "up" ) ) 
     
    19471950        msg_rc( _("Please provide one of the following parameters:") ); 
    19481951        msg_rc( "[on|off|up|down|left|right|select]" ); 
    1949         free( val.psz_string ); 
    1950         return i_error; 
    1951     } 
    1952  
    1953     i_error = VLC_SUCCESS; 
     1952        i_error = VLC_EGENERIC; 
     1953    } 
     1954 
    19541955    free( val.psz_string ); 
    19551956    return i_error;