Closed ryancaicse closed 3 years ago
Line 4857 and 4853 have return statements so the function returns with the lock acquired without reaching Line 4867.
return from main
will close the program entirely. It means it was not able to create threads properly so it does not matter.
OK, thanks for your comments. But it does not harm to releasing locks for code symmetry.
It seems the lock release of stats_lock is missing before Line 4857. Should it be a bug?
https://github.com/WyvernTKC/cpuminer-gr-avx2/blob/d2e391d29a0e9a42de2b85c25d51824b58554411/cpu-miner.c#L4841-L4857