Commit ad2a0838 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/concat: revert one hunk of 20dfab33

The deallocated memory contains resources that need to be freed before it
can be deallocated. The original code was correct.
This also fixes a double free
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8be56e46
......@@ -111,9 +111,10 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags)
if (err < 0)
concat_close(h);
else if ((err = av_reallocp(&nodes, data->length * sizeof(*nodes))) < 0)
else if (!(nodes = av_realloc(nodes, data->length * sizeof(*nodes)))) {
concat_close(h);
else
err = AVERROR(ENOMEM);
} else
data->nodes = nodes;
return err;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment