[readobj] Fix memory leak.