summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2019-10-14 20:21:52 +0300
committerJan Ekström <jeebjp@gmail.com>2019-10-15 22:12:48 +0300
commiteaa3c1c922a41741da198dd9fd63750a4096ddeb (patch)
tree593c028561839b08d07c51f53342843d894ce659
parent03e7a36a733b839b15d8cb8c71345802350d19f0 (diff)
downloadmpv-master.tar.bz2
mpv-master.tar.xz
vo_gpu/d3d11: fix memleak of the adapter description stringHEADmaster
-rw-r--r--video/out/gpu/d3d11_helpers.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/video/out/gpu/d3d11_helpers.c b/video/out/gpu/d3d11_helpers.c
index e7d0aa9768..7122915763 100644
--- a/video/out/gpu/d3d11_helpers.c
+++ b/video/out/gpu/d3d11_helpers.c
@@ -209,10 +209,14 @@ static IDXGIAdapter1 *get_d3d11_adapter(struct mp_log *log,
requested_adapter_name))
{
picked_adapter = adapter;
- break;
}
talloc_free(adapter_description);
+
+ if (picked_adapter) {
+ break;
+ }
+
SAFE_RELEASE(adapter);
}