diff options
Diffstat (limited to 'modutils/modprobe-small.c')
-rw-r--r-- | modutils/modprobe-small.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index f4f17e766..188a7f229 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c | |||
@@ -205,6 +205,7 @@ static void parse_module(module_info *info, const char *pathname) | |||
205 | /* Read (possibly compressed) module */ | 205 | /* Read (possibly compressed) module */ |
206 | len = 64 * 1024 * 1024; /* 64 Mb at most */ | 206 | len = 64 * 1024 * 1024; /* 64 Mb at most */ |
207 | module_image = xmalloc_open_zipped_read_close(pathname, &len); | 207 | module_image = xmalloc_open_zipped_read_close(pathname, &len); |
208 | /* module_image == NULL is ok here, find_keyword handles it */ | ||
208 | //TODO: optimize redundant module body reads | 209 | //TODO: optimize redundant module body reads |
209 | 210 | ||
210 | /* "alias1 symbol:sym1 alias2 symbol:sym2" */ | 211 | /* "alias1 symbol:sym1 alias2 symbol:sym2" */ |
@@ -845,6 +846,8 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) | |||
845 | 846 | ||
846 | len = MAXINT(ssize_t); | 847 | len = MAXINT(ssize_t); |
847 | map = xmalloc_open_zipped_read_close(*argv, &len); | 848 | map = xmalloc_open_zipped_read_close(*argv, &len); |
849 | if (!map) | ||
850 | bb_perror_msg_and_die("can't read '%s'", *argv); | ||
848 | if (init_module(map, len, | 851 | if (init_module(map, len, |
849 | IF_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(options ? options : "") | 852 | IF_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(options ? options : "") |
850 | IF_NOT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE("") | 853 | IF_NOT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE("") |