]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/tmpfs/lib/src/fs.cc
Update
[l4.git] / l4 / pkg / tmpfs / lib / src / fs.cc
index 0ac3c14900f4492c63b418fa23bf351ef3090a66..e35e6d23a9b13b11c955ce1471a0ca5a24f14392 100644 (file)
@@ -326,7 +326,7 @@ Tmpfs_dir::get_entry(const char *name, int flags, mode_t mode,
   Ref_ptr<Node> path;
   if (!*name)
     {
-      *file = this;
+      *file = cxx::ref_ptr(this);
       return 0;
     }
 
@@ -351,9 +351,9 @@ Tmpfs_dir::get_entry(const char *name, int flags, mode_t mode,
     }
 
   if (path->is_dir())
-    *file = new Tmpfs_dir(cxx::ref_ptr_static_cast<Pers_dir>(path));
+    *file = cxx::ref_ptr(new Tmpfs_dir(cxx::ref_ptr_static_cast<Pers_dir>(path)));
   else
-    *file = new Tmpfs_file(cxx::ref_ptr_static_cast<Pers_file>(path));
+    *file = cxx::ref_ptr(new Tmpfs_file(cxx::ref_ptr_static_cast<Pers_file>(path)));
 
   if (!*file)
     return -ENOMEM;