Commit 70d88f638d54eb25cd830c8ed7d8d90831ac476d

Con Kolivas 2014-03-28T08:32:25

Fix memory leak in update_gbt_solo

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/cgminer.c b/cgminer.c
index bd27071..3d19c14 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -6949,6 +6949,7 @@ retry:
 			stage_work(work);
 		} else
 			free_work(work);
+		json_decref(val);
 	} else {
 		applog(LOG_DEBUG, "Pool %d json_rpc_call failed on get gbt, retrying in 5s",
 		       pool->pool_no);