Browse Source

Bugfix: Release GBT submission JSON objects after dumping them

Luke Dashjr 13 years ago
parent
commit
8ce2fb48d4
1 changed files with 1 additions and 0 deletions
  1. 1 0
      miner.c

+ 1 - 0
miner.c

@@ -2104,6 +2104,7 @@ static bool submit_upstream_work(const struct work *work, CURL *curl, bool resub
 		swap32yes(data, work->data, 80 / 4);
 		swap32yes(data, work->data, 80 / 4);
 		json_t *req = blkmk_submit_jansson(work->tmpl, data, work->dataid, *((uint32_t*)&work->data[76]));
 		json_t *req = blkmk_submit_jansson(work->tmpl, data, work->dataid, *((uint32_t*)&work->data[76]));
 		s = json_dumps(req, 0);
 		s = json_dumps(req, 0);
+		json_decref(req);
 		sd = bin2hex(data, 80);
 		sd = bin2hex(data, 80);
 	} else {
 	} else {
 		s  = malloc(345);
 		s  = malloc(345);