X-Git-Url: https://rtime.felk.cvut.cz/gitweb/l4.git/blobdiff_plain/8fe9942cde59835eb3c3c6936d866dd3305582ef..003b628647705666de261350195da72a38f2c4d2:/l4/pkg/tmpfs/lib/src/fs.cc diff --git a/l4/pkg/tmpfs/lib/src/fs.cc b/l4/pkg/tmpfs/lib/src/fs.cc index 0ac3c1490..e35e6d23a 100644 --- a/l4/pkg/tmpfs/lib/src/fs.cc +++ b/l4/pkg/tmpfs/lib/src/fs.cc @@ -326,7 +326,7 @@ Tmpfs_dir::get_entry(const char *name, int flags, mode_t mode, Ref_ptr 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(path)); + *file = cxx::ref_ptr(new Tmpfs_dir(cxx::ref_ptr_static_cast(path))); else - *file = new Tmpfs_file(cxx::ref_ptr_static_cast(path)); + *file = cxx::ref_ptr(new Tmpfs_file(cxx::ref_ptr_static_cast(path))); if (!*file) return -ENOMEM;