avfilter/asrc_flite: Fix use-after-frees
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Wed, 6 Oct 2021 15:21:04 +0000 (17:21 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Sun, 10 Oct 2021 12:27:13 +0000 (14:27 +0200)
commit18ddb25c7a58404641de2f6aa68220bd509e376c
tree3e1715b1873c98cb724f23d570759f7d5952ba05
parent304cc0379870ebf155502069939582f1065ef3b5
avfilter/asrc_flite: Fix use-after-frees

When an flite filter instance is uninitialized and the refcount
of the corresponding voice_entry reaches zero, the voice is
unregistered, yet the voice_entry's pointer to the voice is not reset.
(Whereas some other pointers are needlessly reset.)
Because of this a new flite filter instance will believe said voice
to already be registered, leading to use-after-frees.
Fix this by resetting the right pointer instead of the wrong ones.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
libavfilter/asrc_flite.c