Selaa lähdekoodia

Fix a memory leak

Ian Goldberg 1 vuosi sitten
vanhempi
commit
6534d81042
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      Enclave/sort.cpp

+ 1 - 0
Enclave/sort.cpp

@@ -57,6 +57,7 @@ size_t sort_precompute(uint32_t N)
 
     WaksmanNetwork wnet(N);
     wnet.setPermutation(random_permutation);
+    delete[] random_permutation;
 
     // Note that sized_wns[N] creates a map entry for N if it doesn't yet exist
     pthread_mutex_lock(&precomp_wns.mutex);