[vlc-commits] dxva2: fix a leak on error

Steve Lhomme git at videolan.org
Tue Mar 20 10:36:39 CET 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Mar 20 10:01:55 2018 +0100| [bd5d9356c9f63e2cc38934aaea422f10a79368a0] | committer: Steve Lhomme

dxva2: fix a leak on error

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bd5d9356c9f63e2cc38934aaea422f10a79368a0
---

 modules/codec/avcodec/dxva2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 87f9988175..895ae325ff 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -682,7 +682,7 @@ static int DxCreateVideoDecoder(vlc_va_t *va, int codec_id,
     CoTaskMemFree(cfg_list);
     if (cfg_score <= 0) {
         msg_Err(va, "Failed to find a supported decoder configuration");
-        return VLC_EGENERIC;
+        goto error;
     }
 
     /* Create the decoder */



More information about the vlc-commits mailing list