To my knowledge, there should be no problems in your leaving Qatar. A six month validity of passport is required at the time of stamping of visa or renewal of RP. Suggest you call your your embassy and confirm from them.