In case of a water heater malfunction or leak, immediately turn off the power supply (gas or electricity) and the cold water supply valve. If there’s a risk of electrical shock, avoid contact with standing water. Assess the issue and call a professional plumber if necessary. Regular maintenance and inspections can help prevent such issues and ensure the safety of your home.