Bug 1024473 - Memory leak reported by valgrind
Summary: Memory leak reported by valgrind
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: libusbx
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Hans de Goede
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-29 17:56 UTC by Christophe Fergeau
Modified: 2013-11-20 14:48 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-20 14:48:20 UTC
Type: Bug


Attachments (Terms of Use)

Description Christophe Fergeau 2013-10-29 17:56:50 UTC
When running remote-viewer through valgrind, I got this trace:
==13623== 48 bytes in 2 blocks are definitely lost in loss record 7,424 of 13,299
==13623==    at 0x4A06409: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13623==    by 0x6B52971: handle_events (io.c:1940)
==13623==    by 0x6B536F2: libusb_handle_events_timeout_completed (io.c:2126)
==13623==    by 0x6B537DE: libusb_handle_events (io.c:2202)
==13623==    by 0x5C18A69: spice_usb_device_manager_usb_ev_thread (usb-device-manager.c:1149)
==13623==    by 0x3D17C6EA04: g_thread_proxy (gthread.c:798)
==13623==    by 0x3134A07F32: start_thread (pthread_create.c:309)
==13623==    by 0x31342F4EAC: clone (clone.S:111)

This is with libusbx-1.0.17-1.fc20.x86_64 (happened with 1.0.16 as well).
I couldn't spot an obvious leak looking at the code. I can reliably reproduce it, so let me know if more tests are needed. I'm logging this here to not forget, let me know if this should go elsewhere.

Comment 1 Hans de Goede 2013-11-20 12:23:18 UTC
Hi,

I believe this may be fixed by the 3 commits I've just pushed to libusbx git:
https://github.com/libusbx/libusbx/commits/master

Can you build libusbx from master and give that a try?

Thanks & Regards,

Hans

Comment 2 Christophe Fergeau 2013-11-20 14:48:20 UTC
Hmm just tried to reproduce, but I did not manage to reproduce, even with f20 libusbx, and I did not leave enough details about the exact setup I was using :(
Let's just say it's fixed, and I'll reopen if I see that again.


Note You need to log in before you can comment on or make changes to this bug.