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:
@@ -144,6 +144,8 @@ addAttr(const char *file, type_code type, const char *name,
|
|||||||
fs_remove_attr(fd, name);
|
fs_remove_attr(fd, name);
|
||||||
ssize_t bytes = writeAttr(fd, type, name, value, length);
|
ssize_t bytes = writeAttr(fd, type, name, value, length);
|
||||||
|
|
||||||
|
close(fd);
|
||||||
|
|
||||||
return bytes >= 0 ? B_OK : bytes;
|
return bytes >= 0 ? B_OK : bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user