mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 22:59:16 +02:00
Adding extra check in port finalization before freeing the buffer.
Thanks again to Lorenzo.
This commit is contained in:
parent
3dc5ecf16f
commit
3cefb4fce6
1 changed files with 1 additions and 1 deletions
2
sexp.c
2
sexp.c
|
@ -144,7 +144,7 @@ sexp sexp_finalize_port (sexp ctx, sexp self, sexp_sint_t n, sexp port) {
|
||||||
/* close the stream */
|
/* close the stream */
|
||||||
fclose(sexp_port_stream(port));
|
fclose(sexp_port_stream(port));
|
||||||
/* free the buffer if allocated */
|
/* free the buffer if allocated */
|
||||||
if (sexp_port_buf(port) && sexp_oportp(port)
|
if (sexp_port_buf(port) && sexp_oportp(port) && sexp_vectorp(sexp_port_cookie(port))
|
||||||
#if !SEXP_USE_STRING_STREAMS
|
#if !SEXP_USE_STRING_STREAMS
|
||||||
&& !sexp_port_customp(port)
|
&& !sexp_port_customp(port)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue