it may be dry skin. if you masturbate excessively or frequently have sex it will dry out the skin. it happened to me when my fiance and I were having sex 4-7 times a day. my doctor told me it was probably a condition similar to jock itch.... it wasn't the skin was overly dry so when you get an erection it minutely tears the skin, you don't notice it till after it's already happened. use lotion or baby oil it should work
Having high blood sugar may put you at a higher risk for fungal infections. There are various antifungal ointments available, though I'm not familiar with them. In the future you may want to avoid conditions that might be conducive to jock itch.