[sr-dev] git:master:72443722: rls: free resources in case of errors