[Mesa-dev] [PATCH] i915: Don't leave dangling pointer to i915 context on failure
Ian Romanick
idr at freedesktop.org
Fri Sep 28 08:27:46 PDT 2012
On 09/27/2012 10:33 AM, Eric Anholt wrote:
> Ian Romanick <idr at freedesktop.org> writes:
>
>> From: Ian Romanick <ian.d.romanick at intel.com>
>>
>> Otherwise intelDestroyContext would try to dereference the pointer to
>> freed memory.
>
> Does DestroyContext get called out of all these error paths? If so, why
> not just remove our freeing?
That's a fair point. It also looks like the free in brwCreateContext is
bogus. The structure is allocated with rzalloc, but it's freed with
free. :(
More information about the mesa-dev
mailing list