Selaa lähdekoodia

Merge pull request #246 from SChernykh/fix_leak

Fixed cache->jit memory leak
SChernykh 4 vuotta sitten
vanhempi
sitoutus
09aa65c3c7
1 muutettua tiedostoa jossa 1 lisäystä ja 3 poistoa
  1. 1 3
      src/randomx.cpp

+ 1 - 3
src/randomx.cpp

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