My pinky was trigger finger and I had an operation it was ok for a couple of years then started to go again I left it this time and it locked into the L positiion I went back to the doctor a couple of years ago an he said he could fix it to a slight bend, but if the operation went wrong I would lose my finger.
If it is trigger finger go for the op but be prepard to do a lot of Physiotherapy,
which i didn't.
As to your fingers locking I did a lot of exercises when I was in my teens that involved putting pressure on the all my finger tips now i can lock all my finger exept my pinky in a perfectly strait position and move my finger tips I think this is the joints locking, with trigger finger it is the tendon that is restricted.