Browse Source

Bugfix: gridseed: Don't leak cgpu_info when devices are already claimed

Nate Woolls 11 years ago
parent
commit
a253680a9a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      driver-gridseed.c

+ 2 - 2
driver-gridseed.c

@@ -85,11 +85,11 @@ bool gridseed_detect_custom(const char *path, struct device_drv *driver, struct
 		return false;
 	}
 	
-	struct cgpu_info *device = gridseed_alloc_device(path, driver, info);
-	
 	if (serial_claim_v(path, driver))
 		return false;
 	
+	struct cgpu_info *device = gridseed_alloc_device(path, driver, info);
+	
 	if (!add_cgpu(device))
 		return false;