Store the bitfury identity in the info struct.
diff --git a/driver-bitfury.c b/driver-bitfury.c
index c5b9d64..221f8ae 100644
--- a/driver-bitfury.c
+++ b/driver-bitfury.c
@@ -182,7 +182,7 @@ static bool bitfury_detect_one(struct libusb_device *dev, struct usb_find_device
if (!info)
quit(1, "Failed to calloc info in bitfury_detect_one");
bitfury->device_data = info;
- ident = usb_ident(bitfury);
+ info->ident = ident = usb_ident(bitfury);
switch (ident) {
case IDENT_BF1:
ret = bf1_detect_one(bitfury, info);
@@ -197,6 +197,7 @@ static bool bitfury_detect_one(struct libusb_device *dev, struct usb_find_device
}
if (!ret) {
+ free(info);
usb_uninit(bitfury);
out:
bitfury = usb_free_cgpu(bitfury);
diff --git a/driver-bitfury.h b/driver-bitfury.h
index 79921b8..7ab6908 100644
--- a/driver-bitfury.h
+++ b/driver-bitfury.h
@@ -15,6 +15,7 @@
struct bitfury_info {
struct cgpu_info *base_cgpu;
+ enum sub_ident ident;
uint8_t version;
char product[8];
uint32_t serial;