From 691c4ae503f9eb01dde2866c3a15d12a597ff6a1 Mon Sep 17 00:00:00 2001 From: sin Date: Fri, 9 Aug 2013 09:52:17 +0100 Subject: [PATCH] If opts is NULL just pass "" as expected by the kernel --- insmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/insmod.c b/insmod.c index d92f03c..e1877a7 100644 --- a/insmod.c +++ b/insmod.c @@ -61,7 +61,7 @@ main(int argc, char *argv[]) } } - if (syscall(__NR_init_module, buf, blen, opts) < 0) + if (syscall(__NR_init_module, buf, blen, !opts ? "" : opts) < 0) eprintf("init_module:"); free(opts);