Hi!

On Thu, Jun 08, 2006 at 04:58:12PM +0200, Michael Banck wrote:
> --- lib/commonio.c.orig       2006-06-08 15:12:21.000000000 +0200
> +++ lib/commonio.c    2006-06-08 15:39:49.000000000 +0200
> @@ -47,13 +47,22 @@
>  int lrename (const char *old, const char *new)
>  {
>  
> +#ifdef PATH_MAX
>       char resolved_path[PATH_MAX];
> +#else
> +     char *resolved_path;
> +#endif
>       int res;
>  
>  #if defined(S_ISLNK)
>       struct stat sb = { 0 };
>       if (lstat (new, &sb) == 0 && S_ISLNK (sb.st_mode)) {
> +#ifndef PATH_MAX
> +             resolved_path = realpath (new, NULL);
> +             if (resolved_path == NULL) {
> +#else
>               if (realpath (new, resolved_path) == NULL) {
> +#endif
>                       perror ("realpath in lrename()");
>               } else {
>                       new = resolved_path;

Hey, I don't see the "char *resolved_path" pointer
being freed anywhere afterwards...

-- 
WBR,
xrgtn


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to