Browse Source

Bugfix: Free rpc_req in pool_active and longpolls

Luke Dashjr 13 years ago
parent
commit
6785472846
2 changed files with 5 additions and 1 deletions
  1. 1 1
      libblkmaker
  2. 4 0
      miner.c

+ 1 - 1
libblkmaker

@@ -1 +1 @@
-Subproject commit 905105615fdde07d1e65ab5f40c21b557aa05c6c
+Subproject commit fde65d1bc043a13292986c2cab9c3cd01e50735e

+ 4 - 0
miner.c

@@ -4518,6 +4518,8 @@ tryagain:
 	val = json_rpc_call(curl, pool->rpc_url, pool->rpc_userpass, rpc_req,
 	val = json_rpc_call(curl, pool->rpc_url, pool->rpc_userpass, rpc_req,
 			true, false, &rolltime, pool, false);
 			true, false, &rolltime, pool, false);
 
 
+	free(rpc_req);
+
 	if (val) {
 	if (val) {
 		bool rc;
 		bool rc;
 		json_t *res;
 		json_t *res;
@@ -5255,6 +5257,8 @@ retry_pool:
 		const char *rpc_req;
 		const char *rpc_req;
 		rpc_req = prepare_rpc_req(work, pool->lp_proto, pool->lp_id);
 		rpc_req = prepare_rpc_req(work, pool->lp_proto, pool->lp_id);
 
 
+		free(rpc_req);
+
 		wait_lpcurrent(cp);
 		wait_lpcurrent(cp);
 
 
 		gettimeofday(&start, NULL);
 		gettimeofday(&start, NULL);