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: Juri Linkov <juri <at> linkov.net>
To: "Farblos" <AKFKQU.9DF7RP <at> vodafonemail.de>
Cc: 61256 <at> 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
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.




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.