util/os_file: fix double-close()
Fixes: 955c63d364
("util/os_file: resize buffer to what was actually needed")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user