aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-12-16 06:18:06 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-12-16 06:18:06 +0000
commit37c7121d4022fef0d3c0e71d8ac94f6ad0aa43ad (patch)
tree9f6ead9e70d55f05a0fe82d9116e1b9dfc8299ec
parent8853e67dde7b48745d109f7ed0647b0f86cfec66 (diff)
downloadbusybox-w32-37c7121d4022fef0d3c0e71d8ac94f6ad0aa43ad.tar.gz
busybox-w32-37c7121d4022fef0d3c0e71d8ac94f6ad0aa43ad.tar.bz2
busybox-w32-37c7121d4022fef0d3c0e71d8ac94f6ad0aa43ad.zip
I screwed up the last commit: if dt is null when ENABLE_MULTIPLE_OPTIONS is
off, we'd dereference the null. Oops. git-svn-id: svn://busybox.net/trunk/busybox@12922 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--modutils/modprobe.c14
1 files changed, 8 insertions, 6 deletions
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 )
497 if ( strcmp ( dt-> m_name, mod ) == 0 ) 497 if ( strcmp ( dt-> m_name, mod ) == 0 )
498 break; 498 break;
499 } 499 }
500 if ( ENABLE_FEATURE_MODPROBE_MULTIPLE_OPTIONS && dt ) { 500 if ( dt ) {
501 char* new_opt = NULL; 501 if ( ENABLE_FEATURE_MODPROBE_MULTIPLE_OPTIONS ) {
502 while( ( opt = parse_command_string( opt, &new_opt ) ) ) { 502 char* new_opt = NULL;
503 dt-> m_options = append_option( dt-> m_options, new_opt ); 503 while( ( opt = parse_command_string( opt, &new_opt ) ) ) {
504 dt-> m_options = append_option( dt-> m_options, new_opt );
505 }
506 } else {
507 dt-> m_options = append_option( dt-> m_options, opt );
504 } 508 }
505 } else {
506 dt-> m_options = append_option( dt-> m_options, opt );
507 } 509 }
508 } 510 }
509 } 511 }