summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2019-08-26 15:30:54 +0100
committerDylan Baker <[email protected]>2019-09-04 16:14:52 -0700
commitba255cdd50a7d6ab33e40bbe3fe42b7602cdcebd (patch)
treeb0e54737db642f24ee55e8e95e38e3fdcb2cb4d0 /src
parent1a4e7d72930c081b760caa6918836e46fd791bad (diff)
util/os_file: fix double-close()
Fixes: 955c63d3643f30d7db0c ("util/os_file: resize buffer to what was actually needed") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> (cherry picked from commit 1667360f7d920a35191dc67b7ee120eef95e8788)
Diffstat (limited to 'src')
-rw-r--r--src/util/os_file.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/util/os_file.c b/src/util/os_file.c
index ae41506332d..c670e127c6b 100644
--- a/src/util/os_file.c
+++ b/src/util/os_file.c
@@ -120,7 +120,6 @@ os_read_file(const char *filename)
char *newbuf = realloc(buf, len);
if (!newbuf) {
free(buf);
- close(fd);
errno = -ENOMEM;
return NULL;
}