Message ID | 20191110040733.11755-5-andreas.rheinhardt@gmail.com |
---|---|
State | New |
Headers | show |
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c index 706e8ca38d..3960e6ae2f 100644 --- a/libavformat/wtvdec.c +++ b/libavformat/wtvdec.c @@ -525,8 +525,7 @@ static void get_tag(AVFormatContext *s, AVIOContext *pb, const char *key, int ty return; } - av_dict_set(&s->metadata, key, buf, 0); - av_freep(&buf); + av_dict_set(&s->metadata, key, buf, AV_DICT_DONT_STRDUP_VAL); } /**
This will likely also fix CID 1452571, a false positive resulting from Coverity thinking that av_dict_set() automatically frees its key and value parameters (even without the AV_DICT_DONT_STRDUP_* flags). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavformat/wtvdec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)