Closed joerowell closed 2 years ago
At the moment fpre.h leaks memory allocated in the constructor. Specifically, the constructor allocates memory like this:
fpre.h
for(int i = 0; i < THDS; ++i) { ... eq[i] = new Feq<T>(io[i], party); eq[THDS + i] = new Feq<T>(io2[i], party); }
Whereas the destructor only frees the first half:
for(int i = 0; i < THDS; ++i) { ... delete eq[i]; }
This PR simply deletes the rest of the eq values. AddressSanitizer doesn't show any other leaks, so I think this is the only one.
eq
Thanks!
At the moment
fpre.h
leaks memory allocated in the constructor. Specifically, the constructor allocates memory like this:Whereas the destructor only frees the first half:
This PR simply deletes the rest of the
eq
values. AddressSanitizer doesn't show any other leaks, so I think this is the only one.