Re: [PATCH] intel, gma500, lvds: Fix use after free and mem leak in psb_intel_lvds_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 14, 2012 at 10:15 PM, Jesper Juhl wrote:
> In psb_intel_lvds_init(), if we fail to allocate memory for
> 'psb_intel_connector' we free the memory we previously allocated for
> 'psb_intel_encoder', but we then proceed to use that free'd pointer
> when we do 'psb_intel_encoder->dev_priv = lvds_priv;'.
>
> We may also leak the memory we allocated for 'psb_intel_encoder' if we
> 'goto failed_connector;' and the variable goes out of scope.
>
> While I was there anyway, I also removed the pointless 'if
> (psb_intel_connector)' before freeing it at the 'failed_connector:'
> label - kfree() deals gracefully with NULL pointers, so it is not
> needed.

My bad, thanks for fixing
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux