Commit 5ed0e195de744603c580be03823a060c6db4e192

ckolivas 2014-02-27T15:13:50

Do not remove the info struct on a failure to hfa prepare.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/driver-hashfast.c b/driver-hashfast.c
index 6c9e1ff..8954a82 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -1233,9 +1233,8 @@ out:
 		ret = false;
 
 	if (!ret) {
-		hfa_clear_readbuf(hashfast);
-		free(info);
-		hashfast->device_data = NULL;
+		if (!hashfast->usbinfo.nodev)
+			hfa_clear_readbuf(hashfast);
 		usb_nodev(hashfast);
 	}