Mercurial > emacs
changeset 68301:581e383fb47c
(Fload): Don't leak the file descriptor returned by openp if we are going
to signal an error.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 20 Jan 2006 19:53:36 +0000 |
parents | f283791acd64 |
children | e4979192f24b |
files | src/lread.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lread.c Fri Jan 20 19:12:39 2006 +0000 +++ b/src/lread.c Fri Jan 20 19:53:36 2006 +0000 @@ -801,8 +801,12 @@ if (!NILP (Fequal (found, XCAR (tem)))) count++; if (count > 3) - Fsignal (Qerror, Fcons (build_string ("Recursive load"), - Fcons (found, Vloads_in_progress))); + { + if (fd >= 0) + emacs_close (fd); + Fsignal (Qerror, Fcons (build_string ("Recursive load"), + Fcons (found, Vloads_in_progress))); + } record_unwind_protect (record_load_unwind, Vloads_in_progress); Vloads_in_progress = Fcons (found, Vloads_in_progress); }