[raudio] Fix freeing the wrong memory

This commit is contained in:
Marcos Paccor 2026-01-08 14:56:50 -03:00
parent 0bcf79ce28
commit 77f61f6843

View File

@ -1249,7 +1249,7 @@ void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels)
frameCount = (ma_uint32)ma_convert_frames(data, frameCount, formatOut, channels, sampleRate, wave->data, frameCountIn, formatIn, wave->channels, wave->sampleRate);
if (frameCount == 0)
{
RL_FREE(wave->data);
RL_FREE(data);
TRACELOG(LOG_WARNING, "WAVE: Failed format conversion");
return;
}