mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-10 23:08:07 +00:00
Bugfix: Fix BitFORCE driver memory leak in debug logging
This commit is contained in:
parent
4dd6b649d5
commit
829dcf9d2b
@ -204,6 +204,7 @@ static uint64_t bitforce_scanhash(struct thr_info *thr, struct work *work, uint6
|
||||
unsigned char ob[61] = ">>>>>>>>12345678901234567890123456789012123456789012>>>>>>>>";
|
||||
int i;
|
||||
char *pnoncebuf;
|
||||
char *pblkdata;
|
||||
uint32_t nonce;
|
||||
|
||||
BFwrite(fdDev, "ZDX", 3);
|
||||
@ -220,7 +221,11 @@ static uint64_t bitforce_scanhash(struct thr_info *thr, struct work *work, uint6
|
||||
memcpy(ob + 8, work->midstate, 32);
|
||||
memcpy(ob + 8 + 32, work->data + 64, 12);
|
||||
BFwrite(fdDev, ob, 60);
|
||||
applog(LOG_DEBUG, "BitForce block data: %s", bin2hex(ob + 8, 44));
|
||||
if (opt_debug) {
|
||||
pblkdata = bin2hex(ob + 8, 44);
|
||||
applog(LOG_DEBUG, "BitForce block data: %s", pblkdata);
|
||||
free(pblkdata);
|
||||
}
|
||||
|
||||
BFgets(pdevbuf, sizeof(pdevbuf), fdDev);
|
||||
if (unlikely(!pdevbuf[0])) {
|
||||
|
Loading…
Reference in New Issue
Block a user