diff options
Diffstat (limited to 'c_src/tools-util.c')
-rw-r--r-- | c_src/tools-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/c_src/tools-util.c b/c_src/tools-util.c index 8403bc8b..496c875c 100644 --- a/c_src/tools-util.c +++ b/c_src/tools-util.c @@ -107,7 +107,7 @@ void write_file_str(int dirfd, const char *path, const char *str) wrote = write(fd, str, len); if (wrote != len) die("read error: %m"); - close(fd); + xclose(fd); } char *read_file_str(int dirfd, const char *path) @@ -129,7 +129,7 @@ char *read_file_str(int dirfd, const char *path) buf = NULL; } - close(fd); + xclose(fd); return buf; } |