FS-5443: --resolve leaked because the JS api's copy and return new malloc'd pointers.
If the mod_sofia global presense hash is null, then make sure to free the matches variable before going to done.