Skip to content
Snippets Groups Projects
Commit ad2a0838 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 8be56e46
No related branches found
No related tags found
No related merge requests found
...@@ -111,9 +111,10 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags) ...@@ -111,9 +111,10 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags)
if (err < 0) if (err < 0)
concat_close(h); 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); concat_close(h);
else err = AVERROR(ENOMEM);
} else
data->nodes = nodes; data->nodes = nodes;
return err; return err;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment