Fix allocator/deallocator mismatch.

Should use malloc() for prefix_t since Deref_Prefix() calls free().
Remove dead code.
Merge remote-tracking branch 'origin/topic/jsiwek/coverity'

* origin/topic/jsiwek/coverity:
  Remove dead code.
  Fix allocator/deallocator mismatch.