This looks like double transformation David.
There are many possible causes so I don’t know the exact solution but essentially the verts are being transformed twice.
You can check that you only have 1 armature modifier and also check that parenting.
If the legs are parented to the body and also has a armature modifier, the parent is being transformed and then the verts are being transformed by the armature. (hope that makes sense)
I think if you parented the leg mesh to the armature and not the body this will be resolved.