A memory allocated with "new audio_buffer_t" is then deallocated with "delete []". According to stackoverflow, this is an undefined behaviour. Detected with cppcheck. Patch attached.
Hello, I applied the patch because teh code was definitelly wrong before.
But the code around still looks very fishy.
I would suggest to Volker to check:
Why any new or delete is used here at all. both inbuffer and outbuffer may be local variables here and not new'ed and deleted few lines of code later.
The following memory seems like never freed:
inbuffer->fdata = new float[len1];
May be am wrong, the memory alocations look really crazy, but this defintelly could be a memleak here ...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I applied the patch because teh code was definitelly wrong before.
But the code around still looks very fishy.
I would suggest to Volker to check:
Why any new or delete is used here at all. both inbuffer and outbuffer may be local variables here and not new'ed and deleted few lines of code later.
The following memory seems like never freed:
inbuffer->fdata = new float[len1];
May be am wrong, the memory alocations look really crazy, but this defintelly could be a memleak here ...