[FFmpeg-devel] [PATCH 6/7] avformat/wtvdec: Use AV_DICT_DONT_STRDUP_VAL to avoid av_strdup
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Sun Nov 10 06:07:32 EET 2019
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 at gmail.com>
---
libavformat/wtvdec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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);
}
/**
--
2.20.1
More information about the ffmpeg-devel
mailing list