diff --git a/modules/video_capture/windows/device_info_ds.cc b/modules/video_capture/windows/device_info_ds.cc index 455501fb07..fb8d55137f 100644 --- a/modules/video_capture/windows/device_info_ds.cc +++ b/modules/video_capture/windows/device_info_ds.cc @@ -389,6 +389,9 @@ int32_t DeviceInfoDS::CreateCapabilityMap(const char* deviceUniqueIdUTF8) RTC_LOG(LS_INFO) << "Device support FORMAT_VideoInfo2"; supportFORMAT_VideoInfo = true; } + + FreeMediaType(pmt); + pmt = NULL; } } if (supportFORMAT_VideoInfo2) {