add condition judgment to avoid accessing NULL address if not found existing variable.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9038 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -767,7 +767,9 @@ UpdateVariable (
|
||||
//
|
||||
// Mark the old variable as deleted
|
||||
//
|
||||
if (Variable->CurrPtr != NULL) {
|
||||
Variable->CurrPtr->State &= VAR_DELETED;
|
||||
}
|
||||
|
||||
UpdateVariableInfo (VariableName, VendorGuid, Variable->Volatile, FALSE, TRUE, FALSE, FALSE);
|
||||
|
||||
|
Reference in New Issue
Block a user