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>2014-11-22 20:44:35 +0300
committerMichael Niedermayer <michaelni@gmx.at>2014-11-22 20:56:37 +0300
commit9146a476003cbf3adef88d26834928e53f9a9d8b (patch)
tree7fb29b5658c2fc257dd32abdb142818cee4d9bde /libavfilter/graphparser.c
parent7df2981f04dceed352b362ffe6e6c5be3f27046b (diff)
avfilter/graphparser: Use av_freep(), avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/graphparser.c')
-rw-r--r--libavfilter/graphparser.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index 7e25282d0d..5180bd576d 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -241,8 +241,8 @@ static int link_filter_inouts(AVFilterContext *filt_ctx,
if (p->filter_ctx) {
ret = link_filter(p->filter_ctx, p->pad_idx, filt_ctx, pad, log_ctx);
- av_free(p->name);
- av_free(p);
+ av_freep(&p->name);
+ av_freep(&p);
if (ret < 0)
return ret;
} else {
@@ -344,10 +344,10 @@ static int parse_outputs(const char **buf, AVFilterInOut **curr_inputs,
av_free(name);
return ret;
}
- av_free(match->name);
- av_free(name);
- av_free(match);
- av_free(input);
+ av_freep(&match->name);
+ av_freep(&name);
+ av_freep(&match);
+ av_freep(&input);
} else {
/* Not in the list, so add the first input as a open_output */
input->name = name;