[ros-diffs] [hbirr] 14560: ObCreateObject should return an existing named object if one already exist.

hbirr at svn.reactos.com hbirr at svn.reactos.com
Sat Apr 9 11:37:34 CEST 2005


ObCreateObject should return an existing named object if one already
exist.
Modified: trunk/reactos/ntoskrnl/ob/object.c
  _____  

Modified: trunk/reactos/ntoskrnl/ob/object.c
--- trunk/reactos/ntoskrnl/ob/object.c	2005-04-08 22:19:39 UTC (rev
14559)
+++ trunk/reactos/ntoskrnl/ob/object.c	2005-04-09 09:37:32 UTC (rev
14560)
@@ -712,8 +712,13 @@

       if (ParentHeader &&
 	  RemainingPath.Buffer == NULL)
         {
-          ObDereferenceObject(Parent);
-	  return STATUS_OBJECT_NAME_COLLISION;
+	  if (ParentHeader->ObjectType != Type)
+	    {
+              ObDereferenceObject(Parent);
+	      return STATUS_OBJECT_NAME_COLLISION;
+	    }
+	  *Object = Parent;
+          return STATUS_OBJECT_EXISTS;
 	}
     }
   else
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050409/1f75d48a/attachment.html


More information about the Ros-diffs mailing list