summaryrefslogtreecommitdiff
path: root/libavfilter/graphparser.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-04-15 21:08:37 +0200
committerAnton Khirnov <anton@khirnov.net>2012-04-16 09:28:34 +0200
commitaff01de6415f1ba022f1a58e354ad6e4d0796e97 (patch)
tree6bb404bcd6ccbf2741acb90d4a463b1ff2b7f92e /libavfilter/graphparser.c
parent7ce118bae5cd6b29692e0b3963d48a5610823322 (diff)
graphparser: set next to NULL on an entry extracted from inputs list
Prevents it from referring to the rest of the list.
Diffstat (limited to 'libavfilter/graphparser.c')
-rw-r--r--libavfilter/graphparser.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index f318984397..b3f295f933 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -229,9 +229,10 @@ static int link_filter_inouts(AVFilterContext *filt_ctx,
for (pad = 0; pad < filt_ctx->input_count; pad++) {
AVFilterInOut *p = *curr_inputs;
- if (p)
+ if (p) {
*curr_inputs = (*curr_inputs)->next;
- else if (!(p = av_mallocz(sizeof(*p))))
+ p->next = NULL;
+ } else if (!(p = av_mallocz(sizeof(*p))))
return AVERROR(ENOMEM);
if (p->filter_ctx) {