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