Fixed RootFS not returning a temp heap address
authorJohn Hodge <[email protected]>
Sat, 26 Sep 2009 02:24:18 +0000 (10:24 +0800)
committerJohn Hodge <[email protected]>
Sat, 26 Sep 2009 02:24:18 +0000 (10:24 +0800)
Kernel/vfs/fs/root.c

index 2f5d6e5..9f29ce2 100644 (file)
@@ -144,9 +144,9 @@ char *Root_ReadDir(tVFS_Node *Node, int Pos)
        
        for( ; child && Pos--; child = child->Next ) ;
        
-       if(Pos) return child->Name;
+       if(Pos) return strdup(child->Name);
        
-       return strdup(child->Name);
+       return NULL;
 }
 
 /**

UCC git Repository :: git.ucc.asn.au