Browse Source

Opps, don't double free memory after usb audio transmit disable

teensy4-core
PaulStoffregen 8 years ago
parent
commit
5e79b6f461
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      teensy3/usb_audio.cpp

+ 4
- 4
teensy3/usb_audio.cpp View File

if (usb_audio_transmit_setting == 0) { if (usb_audio_transmit_setting == 0) {
if (left) release(left); if (left) release(left);
if (right) release(right); if (right) release(right);
if (left_1st) release(left_1st);
if (left_2nd) release(left_2nd);
if (right_1st) release(right_1st);
if (right_2nd) release(right_2nd);
if (left_1st) { release(left_1st); left_1st = NULL; }
if (left_2nd) { release(left_2nd); left_2nd = NULL; }
if (right_1st) { release(right_1st); right_1st = NULL; }
if (right_2nd) { release(right_2nd); right_2nd = NULL; }
offset_1st = 0; offset_1st = 0;
return; return;
} }

Loading…
Cancel
Save