When the share of an infant is sold, the proceeds of the sale may be paid by the referees making the sale, to his or her general guardian, or the special guardian appointed for him or her in the suit, upon giving the security required by law, or directed by order of the court.