Mesa (master): util/os_file: fix double-close()
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Sep 3 23:13:00 UTC 2019
Module: Mesa
Branch: master
Commit: 1667360f7d920a35191dc67b7ee120eef95e8788
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1667360f7d920a35191dc67b7ee120eef95e8788
Author: Eric Engestrom <eric.engestrom at intel.com>
Date: Mon Aug 26 15:30:54 2019 +0100
util/os_file: fix double-close()
Fixes: 955c63d3643f30d7db0c ("util/os_file: resize buffer to what was actually needed")
Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
---
src/util/os_file.c | 1 -
1 file changed, 1 deletion(-)
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;
}
More information about the mesa-commit
mailing list