§ 945. Judgment adjusting rents and profits. The court may adjust the rights of a party as against any other party by reason of the receipt by the latter of more than his proper proportion of the rents or profits of a share.