]> err.no Git - yubikey-personalization/commitdiff
don't do yk_release() when failing to open a device
authorKlas Lindfors <klas@yubico.com>
Wed, 10 Oct 2012 06:48:20 +0000 (08:48 +0200)
committerKlas Lindfors <klas@yubico.com>
Wed, 10 Oct 2012 07:31:03 +0000 (09:31 +0200)
ykcore/ykcore_osx.c

index 4802060fca8c946628d6445dc6d0495f0b7f2f9b..cde0787e5209f0c7c708d36437adbbefa802957b 100644 (file)
@@ -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;
                }