Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

No method to free data allocated by mp3dec_load_buf

Open
#98 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
c

Research direction

The allocation happens inside mp3dec_load_buf and mp3dec_load_cb in the single header minimp3.h, which fill mp3dec_file_info_t.buffer using MP3D_MALLOC; read those two functions plus the MP3D_MALLOC/MP3D_FREE macro definitions before writing anything. Add a public mp3dec_free that releases info->buffer with the matching deallocator and declare it alongside the existing API. Done means the function is exported in the header and a small example or test that decodes then frees runs without a leak; note the repo has seen no maintainer reply on this thread for years, so review may be slow.

Written by the indexing model from the issue text.

Description

mp3dec_load_buf and mp3dec_load_cb allocate some data by making a call to malloc.
There is no method for us to call to free that data.

I wrote a small function for that.

void mp3dec_free(mp3dec_file_info_t *info) 
{
    free((void*)info->buffer);
}
Dominant language
C
Stars
2k
Forks
271
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lieff/minimp3

All issues in lieff/minimp3

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.