avutil/frame: free the old side data buffer before replacing it
Fixes memleaks reported by ASAN/Valgrind. Reported-by: Sean McGovern <gseanmcg@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
6d0c89980c
commit
dd5f665b40
@ -811,6 +811,7 @@ static AVFrameSideData *replace_side_data_from_buf(AVFrameSideData *dst,
|
||||
return NULL;
|
||||
|
||||
av_dict_free(&dst->metadata);
|
||||
av_buffer_unref(&dst->buf);
|
||||
dst->buf = buf;
|
||||
dst->data = buf->data;
|
||||
dst->size = buf->size;
|
||||
|
Loading…
Reference in New Issue
Block a user