[Xcb] Memory leak?

Florian Faber faber at faberman.de
Mon Apr 13 08:47:21 PDT 2009


Hi,

is it possible that there's a leak with the buf in
xcb_in.c:read_packet()? 

I found one return with a missing free(buf), but I assume the main
reason would be not freeing buf after it is inserted in the list.

==3055== 74,952 bytes in 2,082 blocks are definitely lost in loss
record 
169 of 173
==3055==    at 0x4C24CCE: malloc (in 
/usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
==3055==    by 0x6E16C04: _xcb_in_read (xcb_in.c:152)
==3055==    by 0x6E15179: _xcb_conn_wait (xcb_conn.c:357)
==3055==    by 0x6E1670F: xcb_wait_for_reply (xcb_in.c:367)
==3055==    by 0x5CBF835: _XReply (xcb_io.c:366)
==3055==    by 0x5CA449B: XParseColor (ParseCol.c:128)
==3055==    by 0x581C60F: fl_parse_color(char const*, unsigned char&, 
unsigned char&, unsigned char&) (in /usr/lib64/fltk-1.1/libfltk.so.1.1)
==3055==    by 0x5827B42: fl_draw_pixmap(char const* const*, int, int, 
Fl_Color) (in /usr/lib64/fltk-1.1/libfltk.so.1.1)
==3055==    by 0x4186BF: HDSPMixerMeter::draw() (HDSPMixerMeter.cxx:45)

With the current 36 byte leak, I lose up to 207KB/s..


Flo
-- 
Machines can do the work, so people have time to think.
public key 6C002249          x-hkp://wwwkeys.eu.pgp.net



More information about the Xcb mailing list