What are the implications of a 172's engine quitting after putting the throttle in idle. Is it more likely that the throttle needs to be calibrated (i.e. it is cutting of fuel flow)?
Carburetor ice. If it idles fine most of the time but not once in a while, look up the temperature and dewpoint at that time and see that the spread is small, and conducive to icing.