Browse Source

Merge branch 'auto_solomine' into bfgminer-4.10.x

Luke Dashjr 10 years ago
parent
commit
87efcdafb1
1 changed files with 3 additions and 0 deletions
  1. 3 0
      miner.c

+ 3 - 0
miner.c

@@ -3068,15 +3068,18 @@ void refresh_bitcoind_address(const bool fresh)
 			}
 			}
 			applog(LOG_WARNING, "Error %cetting coinbase address from pool %d: %s", 'g', pool->pool_no, estrc);
 			applog(LOG_WARNING, "Error %cetting coinbase address from pool %d: %s", 'g', pool->pool_no, estrc);
 			free(estr);
 			free(estr);
+			json_decref(json);
 			continue;
 			continue;
 		}
 		}
 		s = bfg_json_obj_string(json, "result", NULL);
 		s = bfg_json_obj_string(json, "result", NULL);
 		if (unlikely(!s))
 		if (unlikely(!s))
 		{
 		{
 			applog(LOG_WARNING, "Error %cetting coinbase address from pool %d: %s", 'g', pool->pool_no, "(return value was not a String)");
 			applog(LOG_WARNING, "Error %cetting coinbase address from pool %d: %s", 'g', pool->pool_no, "(return value was not a String)");
+			json_decref(json);
 			continue;
 			continue;
 		}
 		}
 		s2 = set_b58addr(s, &newscript);
 		s2 = set_b58addr(s, &newscript);
+		json_decref(json);
 		if (unlikely(s2))
 		if (unlikely(s2))
 		{
 		{
 			applog(LOG_WARNING, "Error %cetting coinbase address from pool %d: %s", 's', pool->pool_no, s2);
 			applog(LOG_WARNING, "Error %cetting coinbase address from pool %d: %s", 's', pool->pool_no, s2);