Slight bending is common and normal. But pain during erection should be taken seriously especially in a diabetic man. The common reasons are priapism and Peyronies disease. They should be taken seriously, otherwise they can cause permanent damage to the penis. Please control
sugar. Consult doctor immediately as you need physical examination of your organs and in most cases Ultrasound is needed. Treatment depends on the cause.