浏览代码

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

main
PaulStoffregen 8 年前
父节点
当前提交
5e79b6f461
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. +4
    -4
      teensy3/usb_audio.cpp

+ 4
- 4
teensy3/usb_audio.cpp 查看文件

@@ -238,10 +238,10 @@ void AudioOutputUSB::update(void)
if (usb_audio_transmit_setting == 0) {
if (left) release(left);
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;
return;
}

正在加载...
取消
保存