[common] fix a memory leak in XMPPClient