LibAIFF CloseFile: Pointer being freed was not allocated occurs randomly

寵の児 提交于 2019-12-02 11:59:00

1, please confirm buffer2 has been initialized with NULL before using. In all your pasted codes, I can not find any assignment or memory allocation for buffer2.

2, please assign the pointer with NULL after calling free, like:

if (r->buffer)
{
    free(r->buffer);
    r->buffer = NULL; 
}
if (r->buffer2)
{
    free(r->buffer2);
    r->buffer2 = NULL; 
}

If all this can not resolve you problem, please give more code about buffer2.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!