TaskState contains linux_bprm struct which encapsulates argv among
other things.
argv might be used around the code and is expected to contain valid
data. Before this patch, ts->bprm->argv was NULL due to it being
freed right after loader_exec().

Signed-off-by: Fabio Erculiani <lx...@sabayon.org>
---
 linux-user/main.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/linux-user/main.c b/linux-user/main.c
index 788ff98..513d583 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3492,11 +3492,6 @@ int main(int argc, char **argv, char **envp)
         _exit(1);
     }
 
-    for (i = 0; i < target_argc; i++) {
-        free(target_argv[i]);
-    }
-    free(target_argv);
-
     for (wrk = target_environ; *wrk; wrk++) {
         free(*wrk);
     }
-- 
1.7.7


Reply via email to