On Mon, Feb 05, 2024 at 11:35:54AM +0100, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: CID 1403229 Dereference after null check > > > > Signed-off-by: Michael Niedermayer > > --- > > libavfilter/signature_lookup.c | 25 ++++++++++++++----------- > > 1 file changed, 14 insertions(+), 11 deletions(-) > > > > diff --git a/libavfilter/signature_lookup.c b/libavfilter/signature_lookup.c > > index 86dd0c66754..6e45fde1b5a 100644 > > --- a/libavfilter/signature_lookup.c > > +++ b/libavfilter/signature_lookup.c > > @@ -37,6 +37,14 @@ > > #define STATUS_END_REACHED 1 > > #define STATUS_BEGIN_REACHED 2 > > > > +static void sll_free(MatchingInfo **sll) > > +{ > > + while (*sll) { > > + sll = &(*sll)->next; > > + av_freep(sll); > > + } > > +} > > + > > This will leak every element except the second (if existing) of the > linked list. ill post a better and split patch thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you fake or manipulate statistics in a paper in physics you will never get a job again. If you fake or manipulate statistics in a paper in medicin you will get a job for life at the pharma industry.