From: Tim King Date: Mon, 26 Sep 2016 04:03:39 +0000 (-0700) Subject: Closing an open file descriptor in MemoryMapFile. X-Git-Tag: cvc5-1.0.0~6028^2~20 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=30d6822d4df5cc91b1134b2da9e18d66b4ba7607;p=cvc5.git Closing an open file descriptor in MemoryMapFile. --- diff --git a/src/parser/memory_mapped_input_buffer.cpp b/src/parser/memory_mapped_input_buffer.cpp index c9515aa92..1554428f7 100644 --- a/src/parser/memory_mapped_input_buffer.cpp +++ b/src/parser/memory_mapped_input_buffer.cpp @@ -110,6 +110,7 @@ static ANTLR3_UINT32 MemoryMapFile(pANTLR3_INPUT_STREAM input, input->data = mmap(0, input->sizeBuf, PROT_READ, MAP_PRIVATE, fd, 0); errno = 0; + close(fd); if(intptr_t(input->data) == -1) { return ANTLR3_ERR_NOMEM; }