git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix dangling pointer issues in ext2dr
[lunaix-os.git]
/
lunaix-os
/
kernel
/
fs
/
xattr.c
diff --git
a/lunaix-os/kernel/fs/xattr.c
b/lunaix-os/kernel/fs/xattr.c
index 6fdb300727f574972c5c3b99d104956681111efd..1b17b3d62a12005ea990f467eb38060d99d7306a 100644
(file)
--- a/
lunaix-os/kernel/fs/xattr.c
+++ b/
lunaix-os/kernel/fs/xattr.c
@@
-5,8
+5,6
@@
#include <lunaix/syscall.h>
#include <lunaix/syscall_utils.h>
#include <lunaix/syscall.h>
#include <lunaix/syscall_utils.h>
-#define DO_STATUS(errno) SYSCALL_ESTATUS(__current->k_status = errno)
-
struct v_xattr_entry*
xattr_new(struct hstr* name)
{
struct v_xattr_entry*
xattr_new(struct hstr* name)
{
@@
-15,7
+13,8
@@
xattr_new(struct hstr* name)
return NULL;
}
*entry =
return NULL;
}
*entry =
- (struct v_xattr_entry){ .name = HHSTR(valloc(VFS_NAME_MAXLEN), 0, 0) };
+ (struct v_xattr_entry){ .name = HHSTR(valloc(VFS_NAME_MAXLEN), 0, 0),
+ .value = NULL };
hstrcpy(&entry->name, name);
return entry;
hstrcpy(&entry->name, name);
return entry;
@@
-24,7
+23,7
@@
xattr_new(struct hstr* name)
void
xattr_free(struct v_xattr_entry* entry)
{
void
xattr_free(struct v_xattr_entry* entry)
{
- vfree(entry->name.value);
+ vfree(
(void*)
entry->name.value);
vfree(entry);
}
vfree(entry);
}