diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-02-26 22:17:31 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-02-26 22:17:34 +0100 |
commit | 96aa9306d5cc7ebb804ee27f1a920dbd7ef83c17 (patch) | |
tree | 08879354b0e2d83003a172a36199616086061198 /kmodloader.c | |
parent | 1dce0407268937cdf37b9c0643632e6c31f5792a (diff) | |
download | ubox-96aa9306d5cc7ebb804ee27f1a920dbd7ef83c17.tar.gz |
kmodloader: initialize module folders in insmod
Fixes a segmentation fault in 'insmod' operation mode, due to uninitialized
path list.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'kmodloader.c')
-rw-r--r-- | kmodloader.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kmodloader.c b/kmodloader.c index b09a323..8f41e74 100644 --- a/kmodloader.c +++ b/kmodloader.c @@ -593,6 +593,8 @@ static int main_insmod(int argc, char **argv) cur += sprintf(cur, "%s", argv[i]); } + init_module_folders(); + if (get_module_path(argv[1])) { name = argv[1]; } else if (!get_module_path(name)) { |