Ask a Lawyer and Get Answers to Your Legal Questions
This is a matter of contract - so your broker's listing agreement (the seller's) will tell you how long the agreement is binding for.
In most cases, the sale must occur within 6 months, but the terms and conditions are going to be specific to your listing agreement/purchase agreement. (There is not a default provision).
If for some reason your agreement is silent (it does not have a clause or condition on this), and the listing agreement has expired, and the sale is cancelled, your obligation to the realtor would end at that time.