summaryrefslogtreecommitdiff
path: root/libavutil/hwcontext_qsv.c
diff options
context:
space:
mode:
authorLinjie Fu <linjie.fu@intel.com>2019-07-26 16:00:24 +0800
committerZhong Li <zhong.li@intel.com>2019-07-30 08:05:01 +0800
commitb3b7523feb5acbe1a3376104616fca389e1aaeca (patch)
tree6ba2966369e06af56b0e12258f7cea8e1d950e37 /libavutil/hwcontext_qsv.c
parent502aff91a769f863792bac61fda1092a8a1bf03b (diff)
lavu/hwcontext_qsv: fix the memory leak
av_dict_free child_device_opts to fix the memory leak. Signed-off-by: Linjie Fu <linjie.fu@intel.com> Signed-off-by: Zhong Li <zhong.li@intel.com>
Diffstat (limited to 'libavutil/hwcontext_qsv.c')
-rw-r--r--libavutil/hwcontext_qsv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
index 59e4ed9157..0329a81ec3 100644
--- a/libavutil/hwcontext_qsv.c
+++ b/libavutil/hwcontext_qsv.c
@@ -1240,6 +1240,8 @@ static int qsv_device_create(AVHWDeviceContext *ctx, const char *device,
ret = av_hwdevice_ctx_create(&priv->child_device_ctx, child_device_type,
e ? e->value : NULL, child_device_opts, 0);
+
+ av_dict_free(&child_device_opts);
if (ret < 0)
return ret;