unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Farblos" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 61256@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	[thread overview]
Message-ID: <871512d8f5344d0db2e8d9f28105ce25@vodafonemail.de> (raw)

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	other threads:[~2023-02-03 16:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-03 16:24 Farblos via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-02-05 18:24 ` bug#61256: master; Function `vc-find-revision-no-save' leaks buffers in case of errors Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871512d8f5344d0db2e8d9f28105ce25@vodafonemail.de \
    --to=bug-gnu-emacs@gnu.org \
    --cc=61256@debbugs.gnu.org \
    --cc=AKFKQU.9DF7RP@vodafonemail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).