CID 930: Fix memory leak in error case.

Note that this file has a completely different coding style, violating ours for
consistency until the whole file can be cleaned up.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27480 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2008-09-13 15:22:30 +00:00
parent 84cd8e6902
commit 4071a5a97b

View File

@ -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;
}