summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/vfs/node.cpp')
-rw-r--r--src/kernel/vfs/node.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/kernel/vfs/node.cpp b/src/kernel/vfs/node.cpp
index ea7b531..c517aae 100644
--- a/src/kernel/vfs/node.cpp
+++ b/src/kernel/vfs/node.cpp
@@ -27,8 +27,7 @@ void vfs_setup() {
node* vfs_find(node* root, char* fn) {
node* el = root;
- char *path = strdup(fn);
- char *s = path;
+ char *path = fn;
char *member = path;
while (*path != 0 && el != 0) {
@@ -39,6 +38,7 @@ node* vfs_find(node* root, char* fn) {
} else {
*path = 0;
el = el->get_child(member);
+ *path = '/';
path++;
member = path;
}
@@ -49,7 +49,6 @@ node* vfs_find(node* root, char* fn) {
if (el != 0 && member != path) {
el = el->get_child(member);
}
- kfree(s);
return el;
}