elflink: Don't pass NULL to spawn_load()
authorMatt Fleming <matt.fleming@linux.intel.com>
Mon, 7 Mar 2011 21:52:54 +0000 (21:52 +0000)
committerMatt Fleming <matt.fleming@linux.intel.com>
Tue, 8 Mar 2011 19:17:59 +0000 (19:17 +0000)
As spawn_load() dereferences the 'argv' parameter it really doesn't
expect it to be NULL.

Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
com32/lib/sys/module/exec.c

index 30a61c0..0e7aa3f 100644 (file)
@@ -387,8 +387,10 @@ int module_load_dependencies(const char *name,const char *dep_file)
                i++;    /* skip a space */
 
                if (strlen(temp_name)) {
+                       char *argv[2] = { NULL, NULL };
+
                        module_load_dependencies(temp_name, MODULES_DEP);
-                       if (spawn_load(temp_name, NULL) < 0)
+                       if (spawn_load(temp_name, argv) < 0)
                                continue;
                }
        }