Don't leak file descriptors.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39383 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2010-11-09 23:28:07 +00:00
parent 612333a601
commit 8e61947230

View File

@ -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;
}