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:
parent
612333a601
commit
8e61947230
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user