Commit f46958af390e22ed894c192c6c8e3ad0e20d3f9e

Con Kolivas 2013-12-02T11:06:22

Don't free the info struct on hashfast shutdown since it's still accessed after a device is removed.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/driver-hashfast.c b/driver-hashfast.c
index 2f0c076..f77b259 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -1016,7 +1016,8 @@ static void hfa_shutdown(struct thr_info *thr)
 	free(info->works);
 	free(info->die_statistics);
 	free(info->die_status);
-	free(info);
+	/* Don't free info here since it will be accessed by statline before
+	 * if a device is removed. */
 }
 
 struct device_drv hashfast_drv = {