]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/lxfuxlibc/lib/libc_be/ux.cc
Update
[l4.git] / l4 / pkg / lxfuxlibc / lib / libc_be / ux.cc
index 57bf9e548f3517d76a4988fca8676d15ee89e2ac..df5f6d13de03765b165eba61ec078d40a31e174b 100644 (file)
@@ -100,12 +100,12 @@ Ux_dir::get_entry(const char *name, int flags, mode_t mode,
   if (S_ISDIR(sb.st_mode))
     {
       //printf("open '%s' as directory\n", name);
-      *file = new Ux_dir(fd);
+      *file = cxx::ref_ptr(new Ux_dir(fd));
     }
   else
     {
       //printf("open '%s' as file\n", name);
-      *file = new Ux_file(fd);
+      *file = cxx::ref_ptr(new Ux_file(fd));
     }
 
   if (!*file)
@@ -306,7 +306,7 @@ public:
     if (fd < 0)
       return fd;
 
-    *dir = new Ux_dir(fd);
+    *dir = cxx::ref_ptr(new Ux_dir(fd));
     if (!*dir)
       return -ENOMEM;
     return 0;