[patch] Fix memory leak in the module loader

Peter Hutterer mailinglists at who-t.net
Mon Feb 18 00:11:54 PST 2008


Arjan van de Ven wrote:
> This one is funny; all the failure paths were very diligent in freeing the "fullpath"
> temporary string, but.. the sucess case was not. All the content only got strdup()d
> so it's not live memory anymore.
> 
> --- xserver/hw/xfree86/loader/loadmod.c.org	2008-02-11 11:48:02.000000000 +0100
> +++ xserver/hw/xfree86/loader/loadmod.c	2008-02-11 11:50:12.000000000 +0100
> @@ -182,6 +182,7 @@ InitPathList(const char *path)
>      }
>      if (list)
>  	list[n] = NULL;
> +    xfree(fullpath);
>      return list;
>  }
>  
> 
> 

thanks, pushed as 6dc71f6b2c7ff49adb504426b4cd206e4745e1e3.



More information about the xorg mailing list