Skip to content

Commit

Permalink
Fix another CFStr reference leak
Browse files Browse the repository at this point in the history
Fix another casw where the concatenation of result and str in name
creation doesn't release the source which is concated onto
result.

Sorry for two PRs here; the condition to tickle this is a bit
different than the condition to tickle the other.
  • Loading branch information
baconpaul committed Mar 23, 2024
1 parent 25b8ab8 commit e33bb23
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions RtMidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,7 @@ CFStringRef CreateEndpointName( MIDIEndpointRef endpoint, bool isExternal )
MIDIObjectGetStringProperty( endpoint, kMIDIPropertyName, &str );
if ( str != NULL ) {
CFStringAppend( result, str );
CFRelease(str);
}

// some MIDI devices have a leading space in endpoint name. trim
Expand Down

0 comments on commit e33bb23

Please sign in to comment.