Closed bamkrs closed 4 years ago
I casually run valgrind against a oatpp-websocket application and found this small - I guess - typo.
When using
std::unique_ptr<v_char8> decoded(new v_char8[size]);
A new array is created, but when freeing, only delete is used by the default deleter.
delete
This can be fixed by using
std::unique_ptr<v_char8[]> decoded(new v_char8[size]);
Now, delete[] is called by the std-libs default deleter.
delete[]
This should be checked in all other oatpp-modules, too, since its an easy copy&paste error.
I just checked the main oatpp module and found the same issue in several places... I'll prepare the PR...
I casually run valgrind against a oatpp-websocket application and found this small - I guess - typo.
When using
A new array is created, but when freeing, only
delete
is used by the default deleter.This can be fixed by using
Now,
delete[]
is called by the std-libs default deleter.This should be checked in all other oatpp-modules, too, since its an easy copy&paste error.