Yes, although the landlord would have to make a reasonable effort to find a replacement tenant once the tenant vacates, the landlord may inform the tenant that he will continue to be liable for rent through the end of the lease term, and that a security deposit is not rent.