# HG changeset patch # User hercules # Date 1065396791 0 # Node ID 69c8ba97f4bd644919e1314d1b9168531d11a070 # Parent 9c12dc86d482dc955decaa37c25992bdeb3bac2e Fixed memory corruption when freeing DLS instruments diff -r 9c12dc86d482 -r 69c8ba97f4bd decoders/timidity/instrum_dls.c --- a/decoders/timidity/instrum_dls.c Sun Oct 05 23:25:59 2003 +0000 +++ b/decoders/timidity/instrum_dls.c Sun Oct 05 23:33:11 2003 +0000 @@ -78,10 +78,8 @@ 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); }