yes because gandalf left them just before they entered the forest. he went to the council and then they forced the necromancer out of dol guldur in the south
That story doesn't really have anything to do with the hobbit though and i don't see them trying too hard to give all the links to lord of...