Replaced dynamic memory handling of work buffer in IDX_entry with std::vector. Memory leak fixed.
Explicit dynamic memory management replaced with std::vector in IDX_entry and related code.