Is the problem in the ankle joint or the knee?
If it's in the ankle (the foot peg), then apply a few coats of nail polish to the ball joint and stick it back in the peg.
If it's in the knee joint, then take the pants off and either brush in a bit of nail polish or just a tiny amount of superglue into the back of the knee joint, in between the different layers of plastic. Once brushed in, slowly move the knee joint back and forth a few times, to make sure the polish/superglue gets in there good, and doesn't lump up enough to stick things together permanently. What you want is for there to be enough of the stuff to increase the friction in the joint (so it's not loose), but not too much that it sets the joint in one position. (This may take multiple attempts, as you apply a little bit at a time, so as not to overshoot it on one go).
Loose knees are a problem in many Truetypes, and many seem to get looser over time. The above method is a tried and true practice to maintaining stiffness in Truetype joints, and I've saved many a figure that would otherwise be useless (I've got about 60 Truetype figures currently, all of which are standing on my shelf without stands).