tmdb: plug some leaks