diff --git a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c index 38f9682229..83372e86d4 100644 --- a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c +++ b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c @@ -418,7 +418,7 @@ CreateDeviceNode ( return NULL; } - DevicePath = AllocatePool (NodeLength); + DevicePath = AllocateZeroPool (NodeLength); if (DevicePath != NULL) { DevicePath->Type = NodeType; DevicePath->SubType = NodeSubType;