af_channelmap: free old extended_data on reallocation

Prevents writes to freed memory and the leak of the old extended data.
Fixes CID732303.
pull/6/head
Janne Grunau 12 years ago
parent 18ff4d2020
commit 1afd7a118f
  1. 2
      libavfilter/af_channelmap.c

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

Loading…
Cancel
Save