(2)If there is any balance left out of any of the said security deposits, after payment under sub-section (1) of the costs referred to in that sub-section, such balance, or where no costs have been awarded or no application as aforesaid has been made within the said period of one year the whole of the said security deposits may, on an application made in that behalf in writing to the court by the person by whom the deposit have been made, or if such person dies after making such deposits, by the legal representative of such person be returned to the said person or to his legal a representative, as the case may be.