Skip to content

Commit

Permalink
Fix memory leak in the long polling thread
Browse files Browse the repository at this point in the history
  • Loading branch information
pooler committed Apr 21, 2016
1 parent 6c504ba commit 96c3676
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cpu-miner.c
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,7 @@ static void *longpoll_thread(void *userdata)
soval = json_object_get(res, "submitold");
submit_old = soval ? json_is_true(soval) : false;
pthread_mutex_lock(&g_work_lock);
work_free(&g_work);
if (have_gbt)
rc = gbt_work_decode(res, &g_work);
else
Expand Down

0 comments on commit 96c3676

Please sign in to comment.