Andreas Schwab writes: > joakim@verona.se writes: > >> + GCPRO6 (file_description, file_mime, file_encoding, rv, absname, encoded_absname); > > That's too much. You only need to protect variables used around calls > that can GC. Arguments to lisp functions are implicitly protected. For > example, there are no function calls during the lifetime of absname. > And encoded_absname is completely unused. It seems to me I only need to protect f, which I would do by GCPRO:ing absname. Since this is aparently wrong, I will leave it like it is, since it doesnt hurt to GCPRO too much. (?) >> + libmagic_error: >> + report_file_error("Libmagic error",Qnil); >> + if (cookie != NULL) magic_close (cookie); > > report_file_error throws, so you leak a resource. Fixed I think. > Andreas. -- Joakim Verona