Browse Source

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>
tags/n4.3
Linjie Fu Zhong Li 5 years ago
parent
commit
b3b7523feb
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavutil/hwcontext_qsv.c

+ 2
- 0
libavutil/hwcontext_qsv.c View File

@@ -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;



Loading…
Cancel
Save