Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-11-10 07:07:30 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2019-12-21 17:01:57 +0300
commit15345881e772571010a54c98ec1ada370c6bad9a (patch)
tree539de02afed176ee1cdec0575cc5cd2ae5c004a1 /libavformat/icecast.c
parentf40fb7963e64c01f2e726949b06d37ad94e6ad5f (diff)
avformat/icecast: Use AV_DICT_DONT_STRDUP_VAL to save an av_strdup
This will probably also fix CID 1452559, a false positive where Coverity claims a double-free occurs, because it thinks that av_dict_set() frees its key and value arguments even when the AV_DICT_DONT_STRDUP_* flags aren't used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Marvin Scholz <epirat07@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/icecast.c')
-rw-r--r--libavformat/icecast.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/icecast.c b/libavformat/icecast.c
index 052cd37f3e..7d8f92fe73 100644
--- a/libavformat/icecast.c
+++ b/libavformat/icecast.c
@@ -114,7 +114,7 @@ static int icecast_open(URLContext *h, const char *uri, int flags)
// Set options
av_dict_set(&opt_dict, "method", s->legacy_icecast ? "SOURCE" : "PUT", 0);
av_dict_set(&opt_dict, "auth_type", "basic", 0);
- av_dict_set(&opt_dict, "headers", headers, 0);
+ av_dict_set(&opt_dict, "headers", headers, AV_DICT_DONT_STRDUP_VAL);
av_dict_set(&opt_dict, "chunked_post", "0", 0);
av_dict_set(&opt_dict, "send_expect_100", s->legacy_icecast ? "-1" : "1", 0);
if (NOT_EMPTY(s->content_type))
@@ -170,7 +170,6 @@ static int icecast_open(URLContext *h, const char *uri, int flags)
cleanup:
av_freep(&user);
- av_freep(&headers);
av_dict_free(&opt_dict);
return ret;