On Fri, Nov 13, 2009 at 09:35:02AM +0100, Peter Kjellerstedt wrote:
>> -----Original Message-----
>> From: uclibc-boun...@uclibc.org [mailto:uclibc-boun...@uclibc.org] On Behalf 
>> Of Bernhard Reutner-Fischer

>> diff --git a/libc/stdlib/realpath.c b/libc/stdlib/realpath.c
>> index 1a00c31..3c3a607 100644
>> --- a/libc/stdlib/realpath.c
>> +++ b/libc/stdlib/realpath.c
>> @@ -72,12 +65,13 @@ char got_path[];
>>      /* Copy so that path is at the end of copy_path[] */
>>      strcpy(copy_path + (PATH_MAX-1) - path_len, path);
>>      path = copy_path + (PATH_MAX-1) - path_len;
>> +    allocated_path = got_path ? NULL : malloc(PATH_MAX);
>
>I may be blind, but as far as I can tell you never use 
>allocated_path for anything (except freeing it)...

right, that should have read
+       allocated_path = got_path ? NULL : (got_path = malloc(PATH_MAX));
_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to