From: John Crispin Date: Wed, 17 Aug 2016 02:32:43 +0000 (+0200) Subject: fix segfault in kmodloader when no modules path was present X-Git-Url: http://git.openwrt.org/?p=project%2Fubox.git;a=commitdiff_plain;h=34c597b8f478a4937fa041bf9da988990314ea85 fix segfault in kmodloader when no modules path was present Signed-off-by: John Crispin --- diff --git a/kmodloader.c b/kmodloader.c index e32e6af..5ba75c1 100644 --- a/kmodloader.c +++ b/kmodloader.c @@ -609,7 +609,10 @@ static int main_insmod(int argc, char **argv) cur += sprintf(cur, "%s", argv[i]); } - init_module_folders(); + if (init_module_folders()) { + fprintf(stderr, "falied to find the folder holding the modules\n"); + return -1; + } if (get_module_path(argv[1])) { name = argv[1];