You don’t want your knees to bend inward during leg exercises, but you don’t want them to bend out too much either. This can lead to wearing of the joints and pain in the knee over time. Fix this muscle imbalance by doing these Corrective Exercises:
Myofascial release + static stretching for calves, biceps femoris, and piriformis (pictures shown below). There are certain resistance exercises which can help too.