commit 9a64f34b64fc72344bc88edeb84e88075896744f from: James Cook via: Thomas Adam date: Sat Apr 19 18:24:49 2025 UTC In parse_ref_file, release lock when fstat fails It's released in case of other errors. This seems to be an oversight. ok stsp@ commit - 66c889b39514153efd49214703ef06a538eb2ee4 commit + 9a64f34b64fc72344bc88edeb84e88075896744f blob - 053e136878b01169876161b848bd4dc87fd8ac43 blob + b08fd49d3d915335c9dec2d5e6f038ed7a90a1c0 --- lib/reference.c +++ lib/reference.c @@ -204,6 +204,8 @@ parse_ref_file(struct got_reference **ref, const char } if (fstat(fileno(f), &sb) == -1) { err = got_error_from_errno2("fstat", abspath); + if (lock) + got_lockfile_unlock(lf, -1); goto done; } if (!S_ISREG(sb.st_mode)) {