Zero all the field so that caller does not need to be concerned about the reserved...
authorqhuang8 <qhuang8@de2fecce-e211-0410-80a6-f3fac2684e05>
Fri, 25 Jan 2008 03:17:56 +0000 (03:17 +0000)
committerqhuang8 <qhuang8@de2fecce-e211-0410-80a6-f3fac2684e05>
Fri, 25 Jan 2008 03:17:56 +0000 (03:17 +0000)
git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@4636 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c

index 38f9682..83372e8 100644 (file)
@@ -418,7 +418,7 @@ CreateDeviceNode (
     return NULL;\r
   }\r
  \r
-  DevicePath = AllocatePool (NodeLength);\r
+  DevicePath = AllocateZeroPool (NodeLength);\r
   if (DevicePath != NULL) {\r
      DevicePath->Type    = NodeType;\r
      DevicePath->SubType = NodeSubType;\r