kmodloader: initialize module folders in insmod
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 26 Feb 2015 21:17:31 +0000 (22:17 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 26 Feb 2015 21:17:34 +0000 (22:17 +0100)
Fixes a segmentation fault in 'insmod' operation mode, due to uninitialized
path list.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
kmodloader.c

index b09a323967527977274bf712c2d2221177239511..8f41e749c7f3edc492f3b86abd1778efcdf1dc95 100644 (file)
@@ -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)) {