Summary: | sockname leaked in _xcb_get_auth_info | ||
---|---|---|---|
Product: | XCB | Reporter: | Alan Coopersmith <alan.coopersmith> |
Component: | Library | Assignee: | xcb mailing list dummy <xcb> |
Status: | RESOLVED FIXED | QA Contact: | xcb mailing list dummy <xcb> |
Severity: | minor | ||
Priority: | medium | CC: | lists |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | Solaris | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Fix memory leak in _xcb_get_auth_info. |
Description
Alan Coopersmith
2010-06-13 11:03:21 UTC
It was introduced in Get rid of PATH_MAX and MAXPATHLEN a546d000 (Arnaud Fontaine 2010-04-30 14:47:16 +0200 259) struct sockaddr *sockname = malloc(socknamelen), *new_sock ==27313== 124 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==27313== at 0x4C284A8: malloc (vg_replace_malloc.c:236) ==27313== by 0x405659: get_peer_sock_name (xcb_auth.c:259) ==27313== by 0x405723: _xcb_get_auth_info (xcb_auth.c:302) ==27313== by 0x4050FD: xcb_connect_to_display_with_auth_info (xcb_util.c:424) ==27313== by 0x40185B: main (xcb-screent.c:43) ==27313== ==27313== LEAK SUMMARY: ==27313== definitely lost: 124 bytes in 1 blocks Created attachment 38898 [details] [review] Fix memory leak in _xcb_get_auth_info. This is a problem in _xcb_get_auth_info: if the first get_peer_sock_name succeeds (returns non-NULL), gotsockname is not set to 1, so sockname is re-assigned later from another call to get_peer_sock_name. Patch attached. |
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.