Proper Roof to Wall Intersect Flashing

The illustrations below show the proper method of flashing where a roof meets with a wall.  A typical example would be where a garage roof meets with the sidewall of the house as shown here.
311.jpg

313.jpg