From e33bb235808029a20dcb60806733b24428785bf3 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Sat, 23 Mar 2024 08:57:57 -0400 Subject: [PATCH] Fix another CFStr reference leak 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. --- RtMidi.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/RtMidi.cpp b/RtMidi.cpp index 11ba4c8..0319a08 100644 --- a/RtMidi.cpp +++ b/RtMidi.cpp @@ -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