Browse Source

libobs: Add check for cf_uid pointer free

This little change skips returning true immediately when a call to
CoreAudio fails. Instead, it uses similar behavior as further 3 calls
below this change, just checking for unfreed pointers before also
returning true.
Daniel Lopez 7 years ago
parent
commit
ceac83e499
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libobs/audio-monitoring/osx/coreaudio-enum-devices.c

+ 1 - 1
libobs/audio-monitoring/osx/coreaudio-enum-devices.c

@@ -41,7 +41,7 @@ static bool obs_enum_audio_monitoring_device(obs_enum_audio_device_cb cb,
 	addr.mSelector = kAudioDevicePropertyDeviceUID;
 	stat = AudioObjectGetPropertyData(id, &addr, 0, NULL, &size, &cf_uid);
 	if (!success(stat, "get audio device UID"))
-		return true;
+		goto fail;
 
 	addr.mSelector = kAudioDevicePropertyDeviceNameCFString;
 	stat = AudioObjectGetPropertyData(id, &addr, 0, NULL, &size, &cf_name);