free-audio / clap-plugins

MIT License
61 stars 9 forks source link

Fix a memory error in AudioBuffer #6

Closed baconpaul closed 2 years ago

baconpaul commented 2 years ago

std::align takes the pointer to the buffer as a reference and modifies it; this means that _dataBase here was being modified on unaligned mallocs which would make the subsequent free also fail. Without this change, valgrind would spit pages of errors and clap-info would crash on exit. With it, valgrind is clean running the plugins in clap-info

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

abique commented 2 years ago

Thank you!