summaryrefslogtreecommitdiffstats
path: root/libavformat/pcmdec.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2017-06-11 15:19:17 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2017-06-13 19:49:06 +0200
commita5b5ce2658bf7506bb31f0b2b4cb44ddbf9a3955 (patch)
tree9f99c1ba95a67e86beddcd33c56c67fce5e8a2e2 /libavformat/pcmdec.c
parent4b2a2969f3e06433a06f835d2af2bae4499314ae (diff)
downloadffmpeg-streaming-a5b5ce2658bf7506bb31f0b2b4cb44ddbf9a3955.zip
ffmpeg-streaming-a5b5ce2658bf7506bb31f0b2b4cb44ddbf9a3955.tar.gz
avformat/pcmdec: fix memory leak
Fixes CID 1396267
Diffstat (limited to 'libavformat/pcmdec.c')
-rw-r--r--libavformat/pcmdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c
index 3c7e8ac..d0ceea6 100644
--- a/libavformat/pcmdec.c
+++ b/libavformat/pcmdec.c
@@ -68,6 +68,7 @@ static int pcm_read_header(AVFormatContext *s)
av_log(s, AV_LOG_ERROR,
"Invalid sample_rate found in mime_type \"%s\"\n",
mime_type);
+ av_freep(&mime_type);
return AVERROR_INVALIDDATA;
}
st->codecpar->sample_rate = rate;
@@ -75,6 +76,7 @@ static int pcm_read_header(AVFormatContext *s)
st->codecpar->channels = channels;
}
}
+ av_freep(&mime_type);
st->codecpar->bits_per_coded_sample =
av_get_bits_per_sample(st->codecpar->codec_id);
OpenPOWER on IntegriCloud