Commit 1afd7a11 authored by Janne Grunau's avatar Janne Grunau

af_channelmap: free old extended_data on reallocation

Prevents writes to freed memory and the leak of the old extended data.
Fixes CID732303.
parent 18ff4d20
......@@ -338,8 +338,8 @@ static int channelmap_filter_samples(AVFilterLink *inlink, AVFilterBufferRef *bu
if (buf->extended_data == buf->data) {
buf->extended_data = new_extended_data;
} else {
buf->extended_data = new_extended_data;
av_free(buf->extended_data);
buf->extended_data = new_extended_data;
}
} else if (buf->extended_data != buf->data) {
av_free(buf->extended_data);
......
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