commit b5d22c386422ab4e29e05d887089fae7e446e40b from: Florian Obser date: Thu Jul 21 05:39:54 2022 UTC Don't chug along if repo format version is unsupported. Found by llvm's scan-build (dead store). OK stsp commit - fced5a66069199024aaf413a06bcf544b959f6a8 commit + b5d22c386422ab4e29e05d887089fae7e446e40b blob - 4c93c601016c47cab8439703f5925c65095b4b7e blob + 1df2b67a5d1be7e6d8c93905c0833dd40165bc3b --- lib/repository.c +++ lib/repository.c @@ -788,8 +788,10 @@ got_repo_open(struct got_repository **repop, const cha err = read_gitconfig(repo, global_gitconfig_path); if (err) goto done; - if (repo->gitconfig_repository_format_version != 0) + if (repo->gitconfig_repository_format_version != 0) { err = got_error_path(path, GOT_ERR_GIT_REPO_FORMAT); + goto done; + } for (i = 0; i < repo->nextensions; i++) { char *ext = repo->extensions[i]; int j, supported = 0;