What happens to the security deposit
Under Texas Property Code §92.105, the new owner is responsible for returning the security deposit from the day title transfers. The new owner must give each tenant a signed statement saying it bought the property, is responsible for the deposit, and identifying the exact dollar amount.
If you collected a deposit, you remain responsible for it until the new owner receives it or takes over that responsibility, unless your written contract says otherwise. It can be sensible to credit the deposit to the buyer at closing.
Read Texas Property Code §92.105 for the ownership-change deposit rule.
