Small holes and corrosion can be fixed from pipe flashing. With just a few materials you can do the job by yourself.
Plugging holes and securing a pipe flashing
You can fix loose pipe flashing with some nails.
To renew the old seal, chip the old caulking found on the flashing edges. You can then use a special masonry caulk to replace the seal. You can also use silicone caulking for sealing step flashing.
Repairing valley type flashing
To repair a valley type flashing, you will need to lift the edges of the shingles and then apply a coating of roofing cement. This should be applied 6 inches from the shingle edges. Seal the shingles underneath if you are working on drip edgings. Do not do this on the drip edge along the eaves.