[xf86-video-intel] pI830->memory_manager is freed twice

Keith Packard keithp at keithp.com
Mon Oct 8 21:55:58 PDT 2007


On Tue, 2007-10-09 at 12:16 +0800, Zhenyu Wang wrote:

> Yeah, it also does the trick that if we failed in first try on tiled allocation,
> we can't free memory_manager, as it's needed for second try. But with this we still 
> might have leak here if both trys fail, we will leave memory_manager. 

Let's close up this possible leak as well then; it's just in a failure
path at initialization time, so it shouldn't be hard. Plus, resetting
pI830->memory_manager to NULL seems necessary.

> Coz memory_manager 
> is freed only in i830_allocator_fini() (called by pScreen->CloseScreen) after taking 
> down ttm. As we failed in ScreenInit, we don't have chance to free it. I think this
> is rare and shouldn't happen practically.

Even rare paths get hit occasionally, even if not in any testing we can
manage.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20071008/722976da/attachment.pgp>


More information about the xorg mailing list