server: Move handle allocation out of open_object_dir.
diff --git a/server/timer.c b/server/timer.c
index 74419e5..436ed7c 100644
--- a/server/timer.c
+++ b/server/timer.c
@@ -231,12 +231,18 @@
 {
     struct unicode_str name;
     struct directory *root = NULL;
+    struct timer *timer;
 
     get_req_unicode_str( &name );
     if (req->rootdir && !(root = get_directory_obj( current->process, req->rootdir, 0 )))
         return;
 
-    reply->handle = open_object_dir( root, &name, req->attributes, &timer_ops, req->access );
+    if ((timer = open_object_dir( root, &name, req->attributes, &timer_ops )))
+    {
+        reply->handle = alloc_handle( current->process, &timer->obj, req->access,
+                                      req->attributes & OBJ_INHERIT );
+        release_object( timer );
+    }
 
     if (root) release_object( root );
 }