diff --git a/src/bin/addattr/addAttr.cpp b/src/bin/addattr/addAttr.cpp index 257e490f90..2ffff467ee 100644 --- a/src/bin/addattr/addAttr.cpp +++ b/src/bin/addattr/addAttr.cpp @@ -144,6 +144,8 @@ addAttr(const char *file, type_code type, const char *name, fs_remove_attr(fd, name); ssize_t bytes = writeAttr(fd, type, name, value, length); + close(fd); + return bytes >= 0 ? B_OK : bytes; }