core: really fix dangling devices
authorNathan Hjelm <hjelmn@google.com>
Fri, 11 Jun 2021 13:59:23 +0000 (07:59 -0600)
committerNathan Hjelm <hjelmn@google.com>
Fri, 11 Jun 2021 13:59:23 +0000 (07:59 -0600)
commit87a8578b9391a4c1a3ed8824d49f6c91cdaea4f2
tree3585fc6d912c2a2b730ea7554e2a42b50ab7f680
parent3e674040edde3196c91e6779e32dd8d7eb79ddf6
core: really fix dangling devices

The prior fix made an incorrect assumption about the reference counting of
parent devices. This CL fixes the issue by checking if the parent device
should be removed from the list as well. This is needed as when the child
device is released the parent may also be released.

Closes #924

Signed-off-by: Nathan Hjelm <hjelmn@google.com>
libusb/hotplug.c
libusb/version_nano.h