diff options
Diffstat (limited to 'libc/src/stdio/fclose.cpp')
| -rw-r--r-- | libc/src/stdio/fclose.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/src/stdio/fclose.cpp b/libc/src/stdio/fclose.cpp index c287442dc001..b4a366af1443 100644 --- a/libc/src/stdio/fclose.cpp +++ b/libc/src/stdio/fclose.cpp @@ -15,7 +15,8 @@ namespace __llvm_libc { LLVM_LIBC_FUNCTION(int, fclose, (::FILE * stream)) { - int result = reinterpret_cast<__llvm_libc::File *>(stream)->close(); + auto *file = reinterpret_cast<__llvm_libc::File *>(stream); + int result = File::cleanup(file); if (result != 0) { errno = result; return EOF; |
