From 124ee9b28a8ab53822e42df17700e61cf88dcb63 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 26 Apr 2012 15:42:09 -0400 Subject: [PATCH] Bugfix: thread_shutdown shouldn't try to free the device, since it's needed afterward --- driver-icarus.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/driver-icarus.c b/driver-icarus.c index 83e526b4..7a7ec494 100644 --- a/driver-icarus.c +++ b/driver-icarus.c @@ -398,21 +398,8 @@ static uint64_t icarus_scanhash(struct thr_info *thr, struct work *work, static void icarus_shutdown(struct thr_info *thr) { - struct cgpu_info *icarus; - - if (thr->cgpu) { - icarus = thr->cgpu; - - if (icarus->device_path) - free(icarus->device_path); - - close(icarus->device_fd); - - devices[icarus->device_id] = NULL; - free(icarus); - - thr->cgpu = NULL; - } + struct cgpu_info *icarus = thr->cgpu; + icarus_close(icarus->device_fd); } struct device_api icarus_api = {