I screwed up the last commit: if dt is null when ENABLE_MULTIPLE_OPTIONS is
authorRob Landley <rob@landley.net>
Fri, 16 Dec 2005 06:18:06 +0000 (06:18 -0000)
committerRob Landley <rob@landley.net>
Fri, 16 Dec 2005 06:18:06 +0000 (06:18 -0000)
off, we'd dereference the null.  Oops.

modutils/modprobe.c

index c9e6701efb76c8568d7d731b0cd1056cbd01519b..844eb99c5ee3d36a95b3939ca9158fa62a2b4697 100644 (file)
@@ -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 );
                                        }
                                }
                        }