matrix-io / matrix-creator-hal

Hardware Abstraction Layer for MATRIX Creator & MATRIX Voice
https://matrix-io.github.io/matrix-documentation/matrix-hal/overview/
GNU General Public License v3.0
70 stars 50 forks source link

MatrixIOBus::Init() appears to leak memory #86

Closed giblet37 closed 6 years ago

giblet37 commented 6 years ago

MatrixIOBus::Init() instantiates local heap-allocated versions of both BusDirect and BusKernel.

However, only one or zero of these is ever assigned to an external variable that is managed and later deleted. In the case of an initialization error, both will leak, but even on success, one always leaks.