Bug 90073 - Leaks in xcb_dri3_open_reply_fds() and get_render_node_from_id_path_tag
Summary: Leaks in xcb_dri3_open_reply_fds() and get_render_node_from_id_path_tag
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: GLX (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-17 12:39 UTC by Guillaume Desmottes
Modified: 2015-07-11 19:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
test app (355 bytes, text/plain)
2015-04-17 12:39 UTC, Guillaume Desmottes
Details
dri3_open: don't leak the reply (657 bytes, patch)
2015-04-17 12:42 UTC, Guillaume Desmottes
Details | Splinter Review
loader: don't leak udev_enumerate (1.21 KB, patch)
2015-04-17 12:42 UTC, Guillaume Desmottes
Details | Splinter Review

Description Guillaume Desmottes 2015-04-17 12:39:52 UTC
Created attachment 115154 [details]
test app

Valgrinding this simple test app reports some leaks:

==1438== 36 bytes in 1 blocks are definitely lost in loss record 7 of 21
==1438==    at 0x4A08BCF: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==1438==    by 0x3EBCC0C394: read_packet (xcb_in.c:254)
==1438==    by 0x3EBCC0C394: _xcb_in_read (xcb_in.c:934)
==1438==    by 0x3EBCC0A3F0: _xcb_conn_wait (xcb_conn.c:495)
==1438==    by 0x3EBCC0BA8E: wait_for_reply (xcb_in.c:491)
==1438==    by 0x3EBCC0BBA0: xcb_wait_for_reply (xcb_in.c:521)
==1438==    by 0x4C8D278: dri3_open (dri3_glx.c:1670)
==1438==    by 0x4C8D278: dri3_create_screen (dri3_glx.c:1909)
==1438==    by 0x4C67CC0: AllocAndFetchScreenConfigs (glxext.c:793)
==1438==    by 0x4C67CC0: __glXInitialize (glxext.c:907)
==1438==    by 0x4C638E0: glXQueryVersion (glxcmds.c:487)
==1438==    by 0x400812: main (in /home/cassidy/dev/gst/master/gst-devtools/validate/a.out)
==1438== 
==1438== 18,100 (432 direct, 17,668 indirect) bytes in 1 blocks are definitely lost in loss record 21 of 21
==1438==    at 0x4A0A946: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==1438==    by 0x3B75A07C20: udev_enumerate_new (in /usr/lib64/libudev.so.1.6.1)
==1438==    by 0x4C8E53F: get_render_node_from_id_path_tag (loader.c:263)
==1438==    by 0x4C8E53F: loader_get_user_preferred_fd (loader.c:399)
==1438==    by 0x4C8D2CC: dri3_create_screen (dri3_glx.c:1923)
==1438==    by 0x4C67CC0: AllocAndFetchScreenConfigs (glxext.c:793)
==1438==    by 0x4C67CC0: __glXInitialize (glxext.c:907)
==1438==    by 0x4C638E0: glXQueryVersion (glxcmds.c:487)
==1438==    by 0x400812: main (in /home/cassidy/dev/gst/master/gst-devtools/validate/a.out)
Comment 1 Guillaume Desmottes 2015-04-17 12:42:26 UTC
Created attachment 115155 [details] [review]
dri3_open: don't leak the reply
Comment 2 Guillaume Desmottes 2015-04-17 12:42:47 UTC
Created attachment 115156 [details] [review]
loader: don't leak udev_enumerate
Comment 3 Emil Velikov 2015-07-11 19:47:09 UTC
Thanks for the patches Guillaume. And props for Matt for pointing me to them - I seems to have missed them.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.