From: Juri Linkov <juri@linkov.net>
To: "Farblos" <AKFKQU.9DF7RP@vodafonemail.de>
Cc: 61256@debbugs.gnu.org
Subject: bug#61256: master; Function `vc-find-revision-no-save' leaks buffers in case of errors
Date: Sun, 05 Feb 2023 20:24:35 +0200 [thread overview]
Message-ID: <86o7q8c6n0.fsf@mail.linkov.net> (raw)
In-Reply-To: <871512d8f5344d0db2e8d9f28105ce25@vodafonemail.de> (Farblos's message of "Fri, 03 Feb 2023 17:24:45 +0100")
close 61256 29.0.60
thanks
> 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...
Good catch, thanks. Now fixed in emacs-29.
prev parent reply other threads:[~2023-02-05 18:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 16:24 bug#61256: master; Function `vc-find-revision-no-save' leaks buffers in case of errors Farblos via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-05 18:24 ` Juri Linkov [this message]
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=86o7q8c6n0.fsf@mail.linkov.net \
--to=juri@linkov.net \
--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).