\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
InitCommunicateBuffer() is really function to check the variable data size.\r
\r
Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) Microsoft Corporation.<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
}\r
\r
CopyMem (Data, GetVariableDataPtr (RtPtrTrack.CurrPtr, mVariableAuthFormat), TempDataSize);\r
- if (Attributes != NULL) {\r
- *Attributes = RtPtrTrack.CurrPtr->Attributes;\r
- }\r
-\r
*DataSize = TempDataSize;\r
\r
UpdateVariableInfo (VariableName, VendorGuid, RtPtrTrack.Volatile, TRUE, FALSE, FALSE, TRUE, &mVariableInfo);\r
}\r
\r
Done:\r
+ if (Status == EFI_SUCCESS || Status == EFI_BUFFER_TOO_SMALL) {\r
+ if (Attributes != NULL && RtPtrTrack.CurrPtr != NULL) {\r
+ *Attributes = RtPtrTrack.CurrPtr->Attributes;\r
+ }\r
+ }\r
mVariableRuntimeCacheReadLock = FALSE;\r
\r
return Status;\r