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:
authorAnton Khirnov <anton@khirnov.net>2011-06-06 15:14:05 +0400
committerAnton Khirnov <anton@khirnov.net>2011-06-08 21:51:31 +0400
commitdbaba52ed25f79c8be0ce1a478b229bf868f8c11 (patch)
treedd866529d18f9860cea016b0d02cd935f336151f /libavformat/utils.c
parent9bcbb250e23959075765edd3cb4c1fcb46736d7d (diff)
lavf: don't try to free private options if priv_data is NULL.
This might happen if there was an error before priv_data was allocated and result in segfault.
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 8ab59e1d3b..c198af07ed 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2551,7 +2551,7 @@ void avformat_free_context(AVFormatContext *s)
AVStream *st;
av_opt_free(s);
- if (s->iformat && s->iformat->priv_class)
+ if (s->iformat && s->iformat->priv_class && s->priv_data)
av_opt_free(s->priv_data);
for(i=0;i<s->nb_streams;i++) {