aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/avf_abitscope.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-08-07 18:54:18 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-08-23 23:32:28 +0200
commit44bcd6f74922ba490e680e79eae897b249c29d62 (patch)
treea8eea2b33c3c62e6edcf0b5bd1ac37b687fa1de2 /libavfilter/avf_abitscope.c
parentfd1a2a54a478462212b25753e7106c13af1e33c6 (diff)
downloadffmpeg-44bcd6f74922ba490e680e79eae897b249c29d62.tar.gz
avfilter/af_channelmap: Fix double-free of AVFilterChannelLayouts on error
The query_formats function of the channelmap filter tries to allocate a list of channel layouts which on success are attached to more permanent objects (an AVFilterLink) for storage afterwards. If attaching succeeds, the link becomes one of the common owners (in this case, the only owner) of the list. Yet if the list has been successfully attached to the link and an error happens lateron, the list was manually freed, which is wrong, because it is owned by its link so that the link's pointer to the list will become dangling and there will be a double-free/use-after-free when the link is later cleaned up automatically. This commit fixes this by removing the custom freeing code; this will temporarily add a leaking codepath (if attaching the list fails, the list will leak), but this will be fixed soon by making sure that an AVFilterChannelLayouts without owner will be automatically freed when attaching it to an AVFilterLink fails. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavfilter/avf_abitscope.c')
0 files changed, 0 insertions, 0 deletions