Subject: master; Function `vc-find-revision-no-save' leaks buffers in case of errors

From: "Farblos" <[email-masked]>
Date: Fri, 03 Feb 2023 17:24:45 +0100

I haven't actually a test case for this issue but found it by
re-indenting function `vc-find-revision-no-save'.  When doing so you
will notice that the following sexps (indented as in the original code)
are actually both UNWINDFORMS:

		(setq failed nil)
	    (when (and failed (unless buffer (get-file-buffer filename)))
	      (with-current-buffer (get-file-buffer filename)
		(set-buffer-modified-p nil))
	      (kill-buffer (get-file-buffer filename)))

Meaning that the failure-handling `when' will never be eval'ed.  I guess
this is a copy-and-paste error and the (setq failed nil) should be
rather placed in the preceeding (with-current-buffer ...).

Probably not a big deal but not hard to fix, either...