On 01/02/2014 10:38 AM, Aaron Watry wrote: > Note: I don't have hardware to test this, but I believe it to be correct. > > Found while tracking down a related leak in evergreen context management. > --- > src/mesa/drivers/dri/radeon/radeon_common_context.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c > b/src/mesa/drivers/dri/radeon/radeon_common_context.c > index 6dec137..161a0b7 100644 > --- a/src/mesa/drivers/dri/radeon/radeon_common_context.c > +++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c > @@ -245,8 +245,8 @@ void radeonDestroyContext(__DRIcontext *driContextPriv ) > _swrast_DestroyContext( &radeon->glCtx ); > > /* free atom list */ > - /* free the Mesa context data */ > - _mesa_free_context_data(&radeon->glCtx); > + /* free the Mesa context and its data */ > + _mesa_destroy_context(&radeon->glCtx);
This will free(radeon), and... > /* free the option cache */ > driDestroyOptionCache(&radeon->optionCache); ...this will dereference it. The context is already freed at the bottom of this function, so I don't think this patch is necessary at all. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev