A safety valve for a cleaning device for a milking installation for milking milk-providing animals having a pair of block valves, a bleed valve, a sliding hollow piston, and a drive unit that are adjustable between a blocking position in which the blocking valves are closed and the bleed valve is open and a throughput position in which the blocking valves are open and the vent valve is closed.