bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61256: master; Function `vc-find-revision-no-save' leaks buffers in


From: Farblos
Subject: bug#61256: master; Function `vc-find-revision-no-save' leaks buffers in case of errors
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...







reply via email to

[Prev in Thread] Current Thread [Next in Thread]