diff options
author | Miguel Figueiredo <elmig@debianpt.org> | 2013-06-01 20:34:08 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-06-01 20:34:08 +0200 |
commit | 47f2683d0200167b4b268c53e34775188cff5366 (patch) | |
tree | 690332ef971306076417f96f066ff5e6a8800455 | |
parent | f6ba5a8c49d881140c065b9eee7713d2f16e2477 (diff) |
Fix invalid memory access
* init/init.c (start_child): Don't free `arg' before it is used.
-rw-r--r-- | init/init.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/init/init.c b/init/init.c index edfe1236..930408e8 100644 --- a/init/init.c +++ b/init/init.c @@ -1068,14 +1068,13 @@ start_child (const char *prog, char **progargs) NULL, 0, NULL, 0); mach_port_deallocate (mach_task_self (), default_ports[INIT_PORT_PROC]); mach_port_deallocate (mach_task_self (), file); - free (args); if (err) { error (0, err, "Cannot execute %s", args); free (args); return -1; } - + free (args); return 0; } |