Skip to content

[raudio]: free converterResidual in UnloadSoundAlias to prevent leak - #5857

Merged
raysan5 merged 1 commit into
raysan5:masterfrom
Peter0x44:master
May 10, 2026
Merged

[raudio]: free converterResidual in UnloadSoundAlias to prevent leak#5857
raysan5 merged 1 commit into
raysan5:masterfrom
Peter0x44:master

Conversation

@Peter0x44

@Peter0x44 Peter0x44 commented May 10, 2026

Copy link
Copy Markdown
Contributor

The example audio_sound_multi was leaking memory every single time the spacebar was pressed.

Direct leak of 576 byte(s) in 9 object(s) allocated from:
    #0 0x758a41019447 in calloc (/usr/lib/liblsan.so.0+0x19447) (BuildId: 8ee115309adc591d231c961c43d245cfa68d9aa7)
    #1 0x562dfbd2c4f3 in LoadAudioBuffer (/home/peter/raylib/examples/audio/audio_sound_multi+0xfa4f3) (BuildId: ea2a6f45d724abeccf904143a32012266f259f93)

This patch fixes that leak.

The example audio_sound_multi was leaking memory every single time the spacebar was pressed.

```c
Direct leak of 576 byte(s) in 9 object(s) allocated from:
    #0 0x758a41019447 in calloc (/usr/lib/liblsan.so.0+0x19447) (BuildId: 8ee115309adc591d231c961c43d245cfa68d9aa7)
    raysan5#1 0x562dfbd2c4f3 in LoadAudioBuffer (/home/peter/raylib/examples/audio/audio_sound_multi+0xfa4f3) (BuildId: ea2a6f45d724abeccf904143a32012266f259f93)
```

This patch fixes that leak.
@raysan5
raysan5 merged commit dcb0ca5 into raysan5:master May 10, 2026
16 checks passed
@raysan5

raysan5 commented May 10, 2026

Copy link
Copy Markdown
Owner

@Peter0x44 thanks for the improvement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants