On Fri, 2011-03-25 at 20:41 +0200, Tiago Vignatti wrote:
> diff --git a/mi/micmap.c b/mi/micmap.c
> index 41e0300..7448ef8 100644
> --- a/mi/micmap.c
> +++ b/mi/micmap.c
> @@ -564,6 +564,8 @@ miInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int 
> *nvisualp,
>       {
>           vid = malloc(nvtype * sizeof (VisualID));
>           if (!vid) {
> +             free(depth);
> +             free(visual);
>               free(preferredCVCs);
>               return FALSE;
>           }

While I agree with this one, in fb/fbscreens.c there is

if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth,
        &defaultVisual,((unsigned long)1<<(imagebpp-1)), 8))
{
    free(visuals);
    free(depths);
    return FALSE;
}

(fbInitVisuals just calls miInitVisuals)

So I think this needs to be fixed to avoid double free.

Nicolas


_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to