From: Gerd Moellmann Date: Tue, 29 Aug 2000 10:37:38 +0000 (+0000) Subject: (openp): Prevent temporary string passed to X-Git-Tag: emacs-pretest-21.0.90~1908 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ace46dfee32cd07c1d58799cc7370e8cf91e9dc9;p=emacs.git (openp): Prevent temporary string passed to Ffile_readable_p from being garbage collected. --- diff --git a/src/lread.c b/src/lread.c index 7f8711aa5e9..904083c4396 100644 --- a/src/lread.c +++ b/src/lread.c @@ -900,9 +900,12 @@ openp (path, str, suffix, storeptr, exec_only) int want_size; Lisp_Object filename; struct stat st; - struct gcpro gcpro1; + struct gcpro gcpro1, gcpro2; + Lisp_Object string; - GCPRO1 (str); + string = Qnil; + GCPRO2 (str, string); + if (storeptr) *storeptr = Qnil; @@ -967,7 +970,6 @@ openp (path, str, suffix, storeptr, exec_only) handler = Ffind_file_name_handler (filename, Qfile_exists_p); if (! NILP (handler) && ! exec_only) { - Lisp_Object string; int exists; string = build_string (fn);