Skip to content

Commit

Permalink
Fixed memory corruption when freeing DLS instruments
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 5, 2003
1 parent fef900e commit 44183d7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions decoders/timidity/instrum_dls.c
Expand Up @@ -78,10 +78,8 @@ static void FreeRIFFChunk(RIFF_Chunk *chunk)
if ( chunk->child ) {
FreeRIFFChunk(chunk->child);
}
while ( chunk->next ) {
RIFF_Chunk *freeable = chunk->next;
chunk->next = freeable->next;
FreeRIFFChunk(freeable);
if ( chunk->next ) {
FreeRIFFChunk(chunk->next);
}
free(chunk);
}
Expand Down

0 comments on commit 44183d7

Please sign in to comment.