summaryrefslogtreecommitdiff
path: root/modutils/modprobe.c
diff options
context:
space:
mode:
authorRob Landley2005-12-16 06:18:06 +0000
committerRob Landley2005-12-16 06:18:06 +0000
commit199501f2a00956265a5dba74ea01badab6c331ac (patch)
tree9f6ead9e70d55f05a0fe82d9116e1b9dfc8299ec /modutils/modprobe.c
parenta930bd333270166fd80a919deb36bfb40eb97f8c (diff)
downloadbusybox-199501f2a00956265a5dba74ea01badab6c331ac.zip
busybox-199501f2a00956265a5dba74ea01badab6c331ac.tar.gz
I screwed up the last commit: if dt is null when ENABLE_MULTIPLE_OPTIONS is
off, we'd dereference the null. Oops.
Diffstat (limited to 'modutils/modprobe.c')
-rw-r--r--modutils/modprobe.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index c9e6701..844eb99 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 );
}
}
}