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:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-13 16:32:42 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-08-13 17:24:30 +0400
commitcba9a40d47aefc6853ca6bb8d72096079baac50c (patch)
tree82ddf132fa67035b7f8c85a4d3716cc48305a5b8 /libavcodec/options.c
parente85771f26814ae192f511a1b01b17ae0d62d62ab (diff)
avcodec: free priv_data in avcodec_copy_context()
Fixes memleak Fixes Ticket2216 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/options.c')
-rw-r--r--libavcodec/options.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/options.c b/libavcodec/options.c
index b68c300152..02fb89f5cb 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -190,6 +190,10 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
src, dest);
return AVERROR(EINVAL);
}
+
+ av_opt_free(dest);
+ av_free(dest->priv_data);
+
memcpy(dest, src, sizeof(*dest));
/* set values specific to opened codecs back to their default state */