Ver código fonte

Merge pull request #246 from SChernykh/fix_leak

Fixed cache->jit memory leak
SChernykh 4 anos atrás
pai
commit
09aa65c3c7
1 arquivos alterados com 1 adições e 3 exclusões
  1. 1 3
      src/randomx.cpp

+ 1 - 3
src/randomx.cpp

@@ -134,9 +134,7 @@ extern "C" {
 
 	void randomx_release_cache(randomx_cache* cache) {
 		assert(cache != nullptr);
-		if (cache->memory != nullptr) {
-			cache->dealloc(cache);
-		}
+		cache->dealloc(cache);
 		delete cache;
 	}