Browse Source

Merge commit '8534c62' into bfgminer

Conflicts:
	driver-bitforce.c
Luke Dashjr 13 years ago
parent
commit
86f7f29dd0
1 changed files with 2 additions and 0 deletions
  1. 2 0
      driver-bitforce.c

+ 2 - 0
driver-bitforce.c

@@ -339,6 +339,7 @@ void bitforce_init(struct cgpu_info *bitforce)
 		bitforce_cmd1(fdDev, 0, pdevbuf, sizeof(pdevbuf), "ZGX");
 		if (unlikely(!pdevbuf[0])) {
 			mutex_unlock(mutexp);
+			BFclose(fdDev);
 			applog(LOG_ERR, "%s: Error reading/timeout (ZGX)", bitforce->dev_repr);
 			return;
 		}
@@ -349,6 +350,7 @@ void bitforce_init(struct cgpu_info *bitforce)
 
 	if (unlikely(!strstr(pdevbuf, "SHA256"))) {
 		mutex_unlock(mutexp);
+		BFclose(fdDev);
 		applog(LOG_ERR, "%s: Didn't recognise BitForce on %s returned: %s", bitforce->dev_repr, devpath, pdevbuf);
 		return;
 	}