Browse Source

Free work before retrying in get_work_thread.

nfactor-troky
ckolivas 12 years ago
parent
commit
f71d635f0f
  1. 6
      cgminer.c

6
cgminer.c

@ -2402,8 +2402,7 @@ retry:
if (clone_available()) if (clone_available())
goto out; goto out;
if (!ret_work) ret_work = make_work();
ret_work = make_work();
if (wc->thr) if (wc->thr)
ret_work->thr = wc->thr; ret_work->thr = wc->thr;
else else
@ -2432,6 +2431,7 @@ retry:
applog(LOG_DEBUG, "json_rpc_call failed on get work, retrying"); applog(LOG_DEBUG, "json_rpc_call failed on get work, retrying");
lagging = true; lagging = true;
dec_queued(); dec_queued();
free_work(ret_work);
goto retry; goto retry;
} }
@ -2448,8 +2448,6 @@ retry:
} }
out: out:
if (ret_work && !ret_work->queued)
free_work(ret_work);
workio_cmd_free(wc); workio_cmd_free(wc);
if (ce) if (ce)
push_curl_entry(ce, pool); push_curl_entry(ce, pool);

Loading…
Cancel
Save