[Mesa-dev] Is it a memory leak?

Brian Paul brianp at vmware.com
Tue Jul 12 06:52:08 PDT 2011


On 07/12/2011 06:38 AM, Zhenbo Xu wrote:
> Hi all,
> I have been detecting memory leaks in mesa for SPEC2000,
> and I found a kind of memory leaks shown in the following code
>
> gl_text_image* image_to_texture(...) {
>    ...
>    textImage = gl_alloc_texttrue_image(...);
>    if (!textImage)
>      return NULL;
>    ...
> switch (image->Type) {
>      case ...
>      ...
>      default:
>          gl_problem(...)
>           return NULL; //here without releasing textImage
>    }
> }
>
> Is it a memory leak ?

Possibly.  Where is this code exactly?

-Brian



More information about the mesa-dev mailing list