Re: [Libusbx-devel] [libusbx] Memory leak due to unhandled hotplug left event on libusb_exit() (#150)

2013-10-15 Thread Hans de Goede
Thanks for the bug report. I've just posted 2 patches to the list which fix this leak: http://www.mail-archive.com/libusbx-devel@lists.sourceforge.net/msg03403.html http://www.mail-archive.com/libusbx-devel@lists.sourceforge.net/msg03401.html --- Reply to this email directly or view it on GitHu

[Libusbx-devel] [PATCH 1/3] io: Ensure all pending events are consumed in one libusb_handle_events call

2013-10-15 Thread Hans de Goede
Before this patch if ie multiple hot-plug events were pending, multiple handle_events calls would be necessary to handle them all, this patch changes handle_events so that the poll is re-done to check for more events if there was activity on any of the special fds. Signed-off-by: Hans de Goede --

[Libusbx-devel] [PATCH 2/3] hotplug: Fix usb_device memleak with hotunplug events pending on libusb_exit

2013-10-15 Thread Hans de Goede
Closes #150 Signed-off-by: Hans de Goede --- libusb/core.c | 14 ++ libusb/version_nano.h | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/libusb/core.c b/libusb/core.c index ea6adcb..b472e89 100644 --- a/libusb/core.c +++ b/libusb/core.c @@ -1969,6 +19

[Libusbx-devel] [PATCH 3/3] core: Make LIBUSB_DEBUG environment variable also work from libusb_exit

2013-10-15 Thread Hans de Goede
libusb_exit sets usbi_default_context to NULL, modify usbi_log_v so that it still honors the LIBUSB_DEBUG environment variable in this case. Signed-off-by: Hans de Goede --- libusb/core.c | 21 ++--- libusb/version_nano.h | 2 +- 2 files changed, 15 insertions(+), 8 del

Re: [Libusbx-devel] [PATCH 1/2] io: Ensure all pending events are consumed in one libusb_handle_events call

2013-10-15 Thread Hans de Goede
Hi all, Ignore please (v2 coming up). Note to self: First test, then do git send-email, not the other way around. Regards, Hans On 10/15/2013 03:34 PM, Hans de Goede wrote: > Before this patch if ie multiple hot-plug events were pending, multiple > handle_events calls would be necessary to ha

[Libusbx-devel] [PATCH 1/2] io: Ensure all pending events are consumed in one libusb_handle_events call

2013-10-15 Thread Hans de Goede
Before this patch if ie multiple hot-plug events were pending, multiple handle_events calls would be necessary to handle them all, this patch changes handle_events so that the poll is re-done to check for more events if there was activity on any of the special fds. Signed-off-by: Hans de Goede --

[Libusbx-devel] [PATCH 2/2] hotplug: Fix usb_device memleak with hotunplug events pending on libusb_exit

2013-10-15 Thread Hans de Goede
Closes #150 Signed-off-by: Hans de Goede --- libusb/core.c | 14 ++ libusb/version_nano.h | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/libusb/core.c b/libusb/core.c index ea6adcb..b472e89 100644 --- a/libusb/core.c +++ b/libusb/core.c @@ -1969,6 +19