The most common cause for an unpleasant odor in a clothes dryer is excess lint in the lint trap. The heat of a dryer causes lint to burn, leaving a scent that lingers in the drum where the clothes spin.
If a person keeps the lint trap clean, she should look around the laundry room for any solvents or paints that may be causing a sudden smell. The heat from a dryer amplifies the odors from those chemicals, so such substances should be kept in a different room. If laundry machines are in the garage, paints and cleaning products should be kept at least 50 feet away. If the smell is reminiscent of mold, the clothes may have sat in the washer too long at the end of the cycle. Taking clothes out of the washing machine no more than six hours after the cycle ends minimizes the risk of this moldy odor.