Patchwork [v2,2/2] linux-user: target_argv is placed on ts->bprm->argv and can't be freed()

login
register
mail settings
Submitter Fabio Erculiani
Date Jan. 3, 2012, 7:20 p.m.
Message ID <1325618423-1181-2-git-send-email-lxnay@sabayon.org>
Download mbox | patch
Permalink /patch/134073/
State New
Headers show

Comments

Fabio Erculiani - Jan. 3, 2012, 7:20 p.m.
---
 linux-user/main.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
Alexander Graf - Jan. 3, 2012, 7:26 p.m.
You're missing a patch description and signed-off-by line :)


Alex

On 03.01.2012, at 20:20, Fabio Erculiani wrote:

> ---
> 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
>

Patch

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);
     }