Out of the Wood
“You are not out of the wood yet,” not yet out of danger. “Don't shout till you are out of the wood,” do not think yourself safe till you are quite clear of the threatened danger. When freebooters were masters of the forests no traveller was safe till he had got clear of their hunting ground.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Out of the Wood from Fact Monster: