diff --git a/src/servers/midi/PortDrivers.cpp b/src/servers/midi/PortDrivers.cpp index e6f299f725..50c2624f63 100644 --- a/src/servers/midi/PortDrivers.cpp +++ b/src/servers/midi/PortDrivers.cpp @@ -100,6 +100,10 @@ int32 MidiPortProducer::GetData() if (read(fd, &next, 1) != 1) { perror("Error reading data from driver"); + if (haveSysEx) + { + free(sysexBuf); + } return B_ERROR; }