free memory afer disabling the usb ISR solves race condition which could corrupt the heap. (issue #1049)

pull/1044/head
porkybrain 2015-04-17 01:56:35 +02:00
parent 2198e68f76
commit 478aa7ef33
1 changed files with 1 additions and 1 deletions

View File

@ -135,10 +135,10 @@ bool USBMSD::connect(bool blocking) {
}
void USBMSD::disconnect() {
USBDevice::disconnect();
//De-allocate MSD page size:
free(page);
page = NULL;
USBDevice::disconnect();
}
void USBMSD::reset() {