encryptogroup / OTExtension

C++ OT extension implementation
GNU Lesser General Public License v3.0
125 stars 35 forks source link

Fix some memoryleaks #15

Closed lenerd closed 6 years ago

lenerd commented 6 years ago

Hello, I have fixed some memory leaks:

The CLock *glock from line 282 of mains/test.cpp was not freed at the end of the function.

Some allocations in the verifyOT methods (here and here) were not freed in case of an verification error. The manually allocated buffers were replaced with std::vectors, the channel object via std::make_unique. Since the latter requires C++14, the compiler flag -std=c++14 was added to the Makefile. If desired, I could change that to C++11 and create the std::unique_ptr directly.