To stop the freeflow described.. a quick hand over the mouthpiece should quiet it down quickly. Then flood the reg as mentioned above.
But..... if it is constantly doing this.... you need to detune that pup.
If your reg does not have an external adjustment, you may need to use an allen wrench (as on an ATX40), and crank it all the way down (if it is a bungied backup for instance)..... or at least until the freeflowing stops occurring (if it is a primary).
You can lose a lot of air very quickly if you are busy with something and not paying attention to that kind of a freeflow. I remember when I first started diving.... I lost 500lbs... like THAT* (as in pretty darn quick).
Running the hoses behind your neck (close), will allow you to always hear a freeflow like that. Most of the time you would be able to catch the freeflow almost immediately, but running the hoses close to your neck will assure you hear it right away.
I would defenitely have the reg detuned if need be..... to not constantly freeflow like that.