If you leave before the lease ends, the landlord must make a good-faith effort to rent the property to a new tenants. If the new tenant's rent is the same as or greater than the rent you were supposed to pay, the lease is considered terminates and you will not be liable to pay rent for the time after you left. You would remain responsible for any rent for the time when the landlord was unable to find a new tenant for the property.