diff options
Diffstat (limited to 'DcsCfg/DcsCfgCrypt.c')
-rw-r--r-- | DcsCfg/DcsCfgCrypt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/DcsCfg/DcsCfgCrypt.c b/DcsCfg/DcsCfgCrypt.c index 7295756..a5b0d6c 100644 --- a/DcsCfg/DcsCfgCrypt.c +++ b/DcsCfg/DcsCfgCrypt.c @@ -737,6 +737,7 @@ OSBackupKeyLoad( if (EFI_ERROR(res) || SecRegionSize < 512) {
SecRegionSize = 0;
MEM_FREE(SecRegionData);
+ SecRegionData = NULL;
}
if (SecRegionSize == 0) {
res = PlatformGetAuthData(&SecRegionData, &SecRegionSize, &SecRegionHandle);
@@ -757,6 +758,7 @@ OSBackupKeyLoad( SecRegionOffset += 128 * 1024;
if (SecRegionOffset > SecRegionSize) {
MEM_FREE(SecRegionData);
+ SecRegionData = NULL;
SecRegionOffset = 0;
res = PlatformGetAuthData(&SecRegionData, &SecRegionSize, &SecRegionHandle);
if (EFI_ERROR(res)) {
@@ -819,6 +821,8 @@ OSBackupKeyLoad( error:
MEM_FREE(SecRegionData);
+ SecRegionData = NULL;
+ SecRegionSize = 0;
return res;
}
@@ -847,6 +851,8 @@ OSRestoreKey() error:
MEM_FREE(SecRegionData);
+ SecRegionData = NULL;
+ SecRegionSize = 0;
return res;
}
|