[syslog-ng] [PATCH] value-pairs: Fix a double free on parse errors

Gergely Nagy algernon at balabit.hu
Thu Mar 15 00:10:28 CET 2012


Balazs Scheidler <bazsi at balabit.hu> writes:

> Ops, I haven't noticed this patch, however I think my solution (just
> posted in the other thread) is somewhat better.
>
> You may have some data allocated by the parser, which wouldn't be freed
> in this case.
>
> Please have a look at my patch and comment if that's ok.

Mmm, it's certainly nicer, but it calls the vp transform set finisher
even on the error path, which might not be the best idea (that can also
allocate stuff). On the other hand, that stuff might be freed elsewhere,
so it's probably not a big deal.

I'll take it to a test drive during the long weekend, but nevertheless,
your approach does look a lot better.

-- 
|8]



More information about the syslog-ng mailing list