From: Eric Engestrom Date: Mon, 26 Aug 2019 14:30:54 +0000 (+0100) Subject: util/os_file: fix double-close() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1667360f7d920a35191dc67b7ee120eef95e8788;p=mesa.git util/os_file: fix double-close() Fixes: 955c63d3643f30d7db0c ("util/os_file: resize buffer to what was actually needed") Signed-off-by: Eric Engestrom Reviewed-by: Tapani Pälli --- 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; }