\r
Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2015-2018 Hewlett Packard Enterprise Development LP<BR>\r
+Copyright (c) Microsoft Corporation.<BR>\r
+\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
}\r
\r
CopyMem (Data, GetVariableDataPtr (Variable.CurrPtr, mVariableModuleGlobal->VariableGlobal.AuthFormat), VarDataSize);\r
- if (Attributes != NULL) {\r
- *Attributes = Variable.CurrPtr->Attributes;\r
- }\r
\r
*DataSize = VarDataSize;\r
UpdateVariableInfo (VariableName, VendorGuid, Variable.Volatile, TRUE, FALSE, FALSE, FALSE, &gVariableInfo);\r
}\r
\r
Done:\r
+ if (Status == EFI_SUCCESS || Status == EFI_BUFFER_TOO_SMALL) {\r
+ if (Attributes != NULL && Variable.CurrPtr != NULL) {\r
+ *Attributes = Variable.CurrPtr->Attributes;\r
+ }\r
+ }\r
ReleaseLockOnlyAtBootTime (&mVariableModuleGlobal->VariableGlobal.VariableServicesLock);\r
return Status;\r
}\r