Add routine for releasing memory allocated to reading material structure