If done correctly and at an appropriate weight, the leg extension is in no way inherently harmful. Applying mechanical tension to any joint will create torque, and it is the responsibility of your soft tissues (as in, your muscles and tendons) to withstand that stress. As long as you practice good form and don’t push your limits too quickly, you should be good to go.