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:
@@ -100,6 +100,10 @@ int32 MidiPortProducer::GetData()
|
|||||||
if (read(fd, &next, 1) != 1)
|
if (read(fd, &next, 1) != 1)
|
||||||
{
|
{
|
||||||
perror("Error reading data from driver");
|
perror("Error reading data from driver");
|
||||||
|
if (haveSysEx)
|
||||||
|
{
|
||||||
|
free(sysexBuf);
|
||||||
|
}
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user