Commit e53c033aa877361a3b29f0b0da1b380d04edfe09

Con Kolivas 2012-06-25T20:12:55

Icarus needs not +2 for realloc, just +1.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/driver-icarus.c b/driver-icarus.c
index e27a162..4d8ac53 100644
--- a/driver-icarus.c
+++ b/driver-icarus.c
@@ -421,7 +421,7 @@ static bool icarus_detect_one(const char *devpath)
 	icarus->device_path = strdup(devpath);
 	icarus->threads = 1;
 	add_cgpu(icarus);
-	icarus_info = realloc(icarus_info, sizeof(struct ICARUS_INFO *) * (total_devices + 2));
+	icarus_info = realloc(icarus_info, sizeof(struct ICARUS_INFO *) * (total_devices + 1));
 
 	applog(LOG_INFO, "Found Icarus at %s, mark as %d",
 		devpath, icarus->device_id);