Flame quenching at the walls of an internal combustion engine