TextSnifferAddon: Fix warnings
Fixed resource leak and possible strings corruption

Signed-off-by: Ingo Weinhold <ingo_weinhold@gmx.de>