As others have said it depends on the malfunction. If it happens during the first magazine through the gun, as has happened to me, I attribute it to new gun hiccups. If it starts happening after some hundreds of rounds have been put through the gun, or never stopped, then I worry. I like to have ~ 300 trouble free rounds through a gun before I carry it. I've sent guns back to factory for issues, had them return fine, and gone on to carry them after they passed that 300 rounds. I've also sold guns that have had issues as I just didn't want to deal with them. I go with my gut.
One thing I have learned: replacing a gun that is known to be reliable with another gun that is "new and cool" is just plain dumb (and I've done it). Reliability is king.
Know the status of your weapon
Keep your muzzle oriented so that no one will be hurt if the firearm discharges
Keep your finger off the trigger until you have an adequate sight picture
Maintain situational awareness