On 1/28/15 20:02, Andrew Burgess wrote:
> * Chen Gang S [2015-01-28 19:34:38 +0800]:
>
>> libiberty/argv.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libiberty/argv.c b/libiberty/argv.c
>> index f2727e8..9fdd55b 100644
>> --- a/libiberty/argv.c
>> +++ b/libiberty
On 1/28/15 20:02, Andrew Burgess wrote:
> * Chen Gang S [2015-01-28 19:34:38 +0800]:
>
>> libiberty/argv.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libiberty/argv.c b/libiberty/argv.c
>> index f2727e8..9fdd55b 100644
>> --- a/libiberty/argv.c
>> +++ b/libibert
> memcpy (*argvp + i, file_argv, file_argc * sizeof (char *));
This code copies all the pointers in file_argv[] into argv[], so if
you freeargv them via file_argv, argv[] will point to free'd memory.
Hence the comment:
> /* Free up memory allocated to process the response file. We do
* Chen Gang S [2015-01-28 19:34:38 +0800]:
> libiberty/argv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libiberty/argv.c b/libiberty/argv.c
> index f2727e8..9fdd55b 100644
> --- a/libiberty/argv.c
> +++ b/libiberty/argv.c
> @@ -454,7 +454,7 @@ expandargv (int *arg
Need free each array elements, or may cause memory leak.
2015-01-28 Chen Gang
* argv.c (expandargv): Use freeargv() instead of free() to avoid
memory leak.
---
libiberty/argv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libiberty/argv.c b/libiberty/argv