[sr-dev] git:master:2d40e14d: presence_xml: better error handling to free all allocated vars