Skip to content

double freed pMP3->pData (solved: tricky user error) #173

Open
@mgambrell

Description

Using code I just pulled from github, we see line 2834 frees pMP3->pData but doesn't null the pointer. this pointer is also freed in drmp3_uninit.
it seems like this pointer should be nulled (and so too the dataCapacity needs to be set to 0)
but...................
why not keep it all around? it has to be disposed in uninit, and the user has to call that. so can't we just save it until then? I don't understand the rationale for trying to free it there when uninit can do the job. Maybe it's that the mp3 stream is deemed dead until some action happens to reset it? Seems complicated.
Fixing it either way works for me.

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions