Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b2779a1fffa063d660c9a78217e9ccea57ab9a3f
      
https://github.com/WebKit/WebKit/commit/b2779a1fffa063d660c9a78217e9ccea57ab9a3f
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-07-23 (Thu, 23 Jul 2026)

  Changed paths:
    M Source/WebCore/platform/mediastream/cocoa/CoreAudioCaptureDevice.cpp

  Log Message:
  -----------
  CoreAudioCaptureDevice::getDeviceInfo() leaks a CFStringRef when the data 
source name is empty
https://bugs.webkit.org/show_bug.cgi?id=320007
rdar://182946069

Reviewed by Youenn Fablet.

If the AudioObjectGetPropertyData() call for the data source name
succeeds but returns a non-null, zero-length CFStringRef,
getDeviceInfo() fell through to the kAudioObjectPropertyName fallback
and overwrote localizedName with a second string without releasing
the first one, leaking a CFStringRef.

Release localizedName before overwriting it in the fallback branch,
so the empty string returned by the data source name lookup is no
longer leaked.

No new tests, since this path only leaks memory and cannot be
detected by output-diffing LayoutTests/WPT; there's no mock layer
for the CoreAudio HAL calls exercised here.

* Source/WebCore/platform/mediastream/cocoa/CoreAudioCaptureDevice.cpp:
(WebCore::getDeviceInfo):

Canonical link: https://commits.webkit.org/317780@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to