]> git.sesse.net Git - ffmpeg/commit
lavc/qsvenc: Fix the memory leak for enc_ctrl.Payload
authorLinjie Fu <linjie.fu@intel.com>
Mon, 15 Apr 2019 13:23:18 +0000 (21:23 +0800)
committerZhong Li <zhong.li@intel.com>
Wed, 22 May 2019 14:16:21 +0000 (22:16 +0800)
commit8f6e65183354d1d402ae80c71cba2759fe152018
tree6dca5cbef2b5186f08ecc24716cc2b1574987bf6
parent82ccb9cba9a7bd530ba2070c90f03d0fde9af1bd
lavc/qsvenc: Fix the memory leak for enc_ctrl.Payload

frame->enc_ctrl.Payload is malloced in get_free_frame, directly memset
the whole structure of enc_ctrl to zero will cause the memory leak for
enc_ctrl.Payload.

frame->enc_ctrl as a structure will be malloc and init to zero by calling
frame = av_mallocz(sizeof(*frame)), so the memset is redundant and can
be removed.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
libavcodec/qsvenc.c