From: Klas Lindfors Date: Fri, 21 Sep 2012 11:26:43 +0000 (+0200) Subject: when calling libusb_exit() clear usb_ctx and libusb_inited X-Git-Tag: v1.8.0~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73cb3d482a984928a80681714c96506cdccf4459;p=yubikey-personalization when calling libusb_exit() clear usb_ctx and libusb_inited --- diff --git a/ykcore/ykcore_libusb-1.0.c b/ykcore/ykcore_libusb-1.0.c index f5032ed..1156065 100644 --- a/ykcore/ykcore_libusb-1.0.c +++ b/ykcore/ykcore_libusb-1.0.c @@ -149,6 +149,8 @@ extern int _ykusb_stop(void) { if (libusb_inited == 1) { libusb_exit(usb_ctx); + usb_ctx = NULL; + libusb_inited = 0; return 1; } yk_errno = YK_EUSBERR;