Rice has strong absorption powers, and by placing it in an open container in your wardrobe, you can keep your clothes smelling laundry-fresh all the time.
Fill a mason jar with dry, uncooked, unflavored rice, and preferably keep it uncovered. If you're concerned it will get knocked over, place a permeable cheesecloth over the top.
You can upgrade your odor-absorbing rice container into a diffuser by stirring in 15 to 20 drops of essential oil. You'll be met with a pleasant scent every time you open the door.
With or without the oil, the rice will absorb foul smells and musty-smelling moisture in the air. Change the rice every two to three months for the best results.