(lcsubstr): fix memory deallocation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>