diff options
Diffstat (limited to 'klm/util/scoped.cc')
-rw-r--r-- | klm/util/scoped.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/klm/util/scoped.cc b/klm/util/scoped.cc index 61394ffc..2c6d5394 100644 --- a/klm/util/scoped.cc +++ b/klm/util/scoped.cc @@ -9,4 +9,8 @@ scoped_fd::~scoped_fd() { if (fd_ != -1 && close(fd_)) err(1, "Could not close file %i", fd_); } +scoped_FILE::~scoped_FILE() { + if (file_ && fclose(file_)) err(1, "Could not close file"); +} + } // namespace util |