[vlc-commits] [Git][videolan/vlc][3.0.x] d3d11_fmt: fix registry enum key leak on success

Steve Lhomme (@robUx4) gitlab at videolan.org
Sun Nov 5 06:50:34 UTC 2023



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
4a887879 by Steve Lhomme at 2023-11-02T07:29:22+01:00
d3d11_fmt: fix registry enum key leak on success

Fixes #28413

- - - - -


1 changed file:

- modules/video_chroma/d3d11_fmt.c


Changes:

=====================================
modules/video_chroma/d3d11_fmt.c
=====================================
@@ -178,7 +178,10 @@ static HKEY GetAdapterRegistry(vlc_object_t *obj, DXGI_ADAPTER_DESC *adapterDesc
         ret = RegQueryValueExA( hKey, "MatchingDeviceId", NULL, NULL, (LPBYTE) &szData, &len );
         if ( ret == ERROR_SUCCESS ) {
             if (_strnicmp(lookup, szData, strlen(lookup)) == 0)
+            {
+                RegCloseKey(hDisplayKey);
                 return hKey;
+            }
             msg_Dbg(obj, "different %s device %s vs %s", DisplayNum, lookup, szData);
         }
         else



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/4a887879b381fa4ee3b849c5c73d2dc977823ec0

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/4a887879b381fa4ee3b849c5c73d2dc977823ec0
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list