* bug#61256: master; Function `vc-find-revision-no-save' leaks buffers in case of errors
@ 2023-02-03 16:24 Farblos via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-05 18:24 ` Juri Linkov
0 siblings, 1 reply; 2+ messages in thread
From: Farblos via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-02-03 16:24 UTC (permalink / raw)
To: 61256
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...
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#61256: master; Function `vc-find-revision-no-save' leaks buffers in case of errors
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
0 siblings, 0 replies; 2+ messages in thread
From: Juri Linkov @ 2023-02-05 18:24 UTC (permalink / raw)
To: Farblos; +Cc: 61256
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-05 18:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.