It is probably smegma, which is the normal secretion of the glands. if not cleaned every day it will give off a bad odour and also act as a medium for bacterial and fungal growth-leading to further bad smell.