1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/concat: revert one hunk of 20dfab33f5

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: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-19 14:51:46 +02:00
parent 8be56e464b
commit ad2a08388c

View File

@ -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;
}