fixes for memory leaks and out of bounds memory access found by ASAN or gcc -flto

This commit is contained in:
kub 2020-12-12 14:57:56 +01:00
parent bb70cc6e66
commit a20300bf1e
8 changed files with 27 additions and 12 deletions

View file

@ -1470,6 +1470,8 @@ static void reset_channels(FM_CH *CH)
CH[c].SLOT[s].Incr = -1;
CH[c].SLOT[s].key = 0;
CH[c].SLOT[s].phase = 0;
CH[c].SLOT[s].ar = CH[c].SLOT[s].ksr = 0;
CH[c].SLOT[s].ar_ksr = 0;
CH[c].SLOT[s].ssg = CH[c].SLOT[s].ssgn = 0;
CH[c].SLOT[s].state= EG_OFF;
CH[c].SLOT[s].volume = MAX_ATT_INDEX;