[sr-dev] git:master:4e6c8fe6: presence: free allocated memory in case of error