summaryrefslogtreecommitdiff
path: root/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c
diff options
context:
space:
mode:
Diffstat (limited to 'SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c')
-rw-r--r--SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c b/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c
index 8552d31b25..6f8808a756 100644
--- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c
+++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c
@@ -445,6 +445,10 @@ AddPubKeyInStore (
FALSE
);
ASSERT_EFI_ERROR (Status);
+ if (EFI_ERROR (Status)) {
+ return 0;
+ }
+
//
// Check whether the public key entry does exist.
//
@@ -492,6 +496,9 @@ AddPubKeyInStore (
FALSE
);
ASSERT_EFI_ERROR (Status);
+ if (EFI_ERROR (Status)) {
+ return 0;
+ }
DataSize = DataSizeOfVariable (Variable.CurrPtr);
Data = GetVariableDataPtr (Variable.CurrPtr);