Typically they drain the cryogenics back, if they can.
Now it depends on the cryogenic. Oxygen can be drained and reused. Hydrogen in liquid form is very hard to keep cool enough, and they will drain it, but they will lose lots of it to venting.
Liquid Nitrogen that they use for pressurization they may just let vent, since the quantities are pretty small (compared to fuel or oxidizer loads) and LN2 is amazingly cheap (Less than milk). Liquid Helium, even though it is very hard to keep cool enough is quite expensive, so even in small quantities they will likely try to recover it.
Wet dress rehearsals and hot fires are the perfect example of this. The vehicle is fully fueled in each case. In the first it is then fully drained. In the second, the engines ignite for a few seconds (less than 3 in the case of Falcon 9, since they ignite at T-3 and stop at T-0).
In the specific case of Falcon 9 and SpaceX, I was initially under the impression, that the tenth feed line in the Loxtopus image below was for cross feed (9 engines, 9 feed lines, plus one for drainage), but I was corrected, and it is in fact a drain line, for just such a case.