Free hash table if opening realm file fails
Plug memory leak in cache when destroying temporary entries