GNU bug report logs - #61256
master; Function `vc-find-revision-no-save' leaks buffers in case of errors

Previous Next

Package: emacs;

Reported by: "Farblos" <AKFKQU.9DF7RP <at> vodafonemail.de>

Date: Fri, 3 Feb 2023 16:26:01 UTC

Severity: normal

Fixed in version 29.0.60

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Farblos" <AKFKQU.9DF7RP <at> vodafonemail.de>
To: 61256 <at> debbugs.gnu.org
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...






This bug report was last modified 2 years and 169 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.