From: Rob Landley Date: Fri, 16 Dec 2005 06:18:06 +0000 (-0000) Subject: I screwed up the last commit: if dt is null when ENABLE_MULTIPLE_OPTIONS is X-Git-Tag: 1_1_0~405 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=199501f2a00956265a5dba74ea01badab6c331ac;p=oweals%2Fbusybox.git I screwed up the last commit: if dt is null when ENABLE_MULTIPLE_OPTIONS is off, we'd dereference the null. Oops. --- diff --git a/modutils/modprobe.c b/modutils/modprobe.c index c9e6701ef..844eb99c5 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -497,13 +497,15 @@ static struct dep_t *build_dep ( void ) if ( strcmp ( dt-> m_name, mod ) == 0 ) break; } - if ( ENABLE_FEATURE_MODPROBE_MULTIPLE_OPTIONS && dt ) { - char* new_opt = NULL; - while( ( opt = parse_command_string( opt, &new_opt ) ) ) { - dt-> m_options = append_option( dt-> m_options, new_opt ); + if ( dt ) { + if ( ENABLE_FEATURE_MODPROBE_MULTIPLE_OPTIONS ) { + char* new_opt = NULL; + while( ( opt = parse_command_string( opt, &new_opt ) ) ) { + dt-> m_options = append_option( dt-> m_options, new_opt ); + } + } else { + dt-> m_options = append_option( dt-> m_options, opt ); } - } else { - dt-> m_options = append_option( dt-> m_options, opt ); } } }