Merge pull request #5361 from csware/no-return-freed_object Do not return free'd git_repository object on error