From: Klas Lindfors Date: Wed, 10 Oct 2012 06:48:20 +0000 (+0200) Subject: don't do yk_release() when failing to open a device X-Git-Tag: v1.8.1~11 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71fa606ab9bfd5137891046fc82358a94fb866d9;p=yubikey-personalization don't do yk_release() when failing to open a device --- diff --git a/ykcore/ykcore_osx.c b/ykcore/ykcore_osx.c index 4802060..cde0787 100644 --- a/ykcore/ykcore_osx.c +++ b/ykcore/ykcore_osx.c @@ -118,7 +118,7 @@ void *_ykusb_open_device(int vendor_id, int product_id) _ykusb_IOReturn = IOHIDDeviceOpen( yk, 0L ); if ( _ykusb_IOReturn != kIOReturnSuccess ) { - yk_release(); + CFRelease(yk); goto error; }