[Mesa-dev] two memory leaks

twied twied at gmx.net
Mon Jan 24 07:42:06 PST 2011


Hi,

I think I found two memory leaks:

Valgrind:
==27418== 112 bytes in 2 blocks are definitely lost in loss record 105 of 157
==27418==    at 0x4C2380C: calloc (vg_replace_malloc.c:467)
==27418==    by 0x8FCF794: r600_create_surface (r600_texture.c:419)

Code:
struct r600_surface *surface = CALLOC_STRUCT(r600_surface);
(...)
return &surface->base;

and

Valgrind:
==27418== 280 (104 direct, 176 indirect) bytes in 1 blocks are definitely lost in loss record 123 of 157
==27418==    at 0x4C2380C: calloc (vg_replace_malloc.c:467)
==27418==    by 0x8FDC027: r600_buffer_create (r600_buffer.c:49)

Code:
struct r600_resource_buffer *rbuffer;
(...)
return &rbuffer->r.base.b;

Didn't know how to resolve them, so I'm reporting without a patch.

Cheers,
Tim


More information about the mesa-dev mailing list