Plug a couple of leaks in xmpp

Change-Id: Ia9114d1a95521906bcd02c2f1b49e4da34b62969