[sr-dev] git:4.2:c468ed26: presence_xml: better error handling to free all allocated vars