Legrandgroup / libezsp

C++ library to send/receive wireless Zigbee messages to/from a Silicon Labs-based transceiver using the EZSP protocol.
BSD 3-Clause "New" or "Revised" License
16 stars 7 forks source link

Fix AES SPI that leads to memory leaks #48

Closed lionelains closed 4 years ago

lionelains commented 4 years ago

When grabbing an AES object to perform AES computation, today, we return a pointer. This leads to a memory leak (object is never de-allocated). Instead, we should return a std::unique_ptr

lionelains commented 4 years ago

Using std::unique_ptr is no compatible with the support of DYNAMIC_ALLOCATION

lionelains commented 4 years ago

Fixed by 187243d77738ce525cdad7343b1ff2d02a35c556