Browse Source

Merge commit 'ac77ceb' into bfgminer

Luke Dashjr 12 years ago
parent
commit
f9a949f41f
2 changed files with 6 additions and 0 deletions
  1. 3 0
      driver-bitforce.c
  2. 3 0
      driver-modminer.c

+ 3 - 0
driver-bitforce.c

@@ -197,7 +197,10 @@ static bool bitforce_detect_one(const char *devpath)
 	}
 
 	if (serial_claim_v(devpath, &bitforce_drv))
+	{
+		BFclose(fdDev);
 		return false;
+	}
 	
 	applog(LOG_DEBUG, "Found BitForce device on %s", devpath);
 	initdata = malloc(sizeof(*initdata));

+ 3 - 0
driver-modminer.c

@@ -126,7 +126,10 @@ modminer_detect_one(const char *devpath)
 	applog(LOG_DEBUG, "ModMiner identified as: %s", devname);
 
 	if (serial_claim_v(devpath, &modminer_drv))
+	{
+		serial_close(fd);
 		return false;
+	}
 	
 	if (1 != write(fd, MODMINER_FPGA_COUNT, 1))
 		bailout(LOG_DEBUG, "ModMiner detect: write failed on %s (get FPGA count)", devpath);