[Snowball-discuss] Memory Leak in sb_stemmer_new()
Richard Boulton
boulton.rj at googlemail.com
Mon Nov 30 12:35:27 GMT 2009
2009/11/30 Ralf Junker <ralfjunker at gmx.de>:
> sb_stemmer_new() leaks memory if either the algorithm or charenc parameters are invalid, i.e. they do not match any of the bult-in algorithms or encodings.
>
> The fix is simple and straightforward - just free the memory allocated to the stemmer variable prior to return NULL.
Thank you for the fix, Ralf - I've applied it, and the fix is in the
libstemmer tarball available from the snowball website now.
--
Richard
More information about the Snowball-discuss
mailing list