The bad smell can be caused by mold or mildew due to warm air entering the unit. Besides, the refrigerator's use of ammonia, hydrogen, and other chemicals might also be responsible for this. It may indicate a severe leak, and you must call a professional for assistance.