VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/Library/DcsCfgLib
diff options
context:
space:
mode:
Diffstat (limited to 'Library/DcsCfgLib')
-rw-r--r--Library/DcsCfgLib/DcsRandom.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Library/DcsCfgLib/DcsRandom.c b/Library/DcsCfgLib/DcsRandom.c
index 084a8cf..eceba8d 100644
--- a/Library/DcsCfgLib/DcsRandom.c
+++ b/Library/DcsCfgLib/DcsRandom.c
@@ -68,13 +68,14 @@ RndFileInit(
)
{
EFI_STATUS res = EFI_NOT_FOUND;
- ZeroMem(rnd, sizeof(DCS_RND));
- rnd->Type = RndTypeFile;
- rnd->GetBytes = RndFileGetBytes;
- rnd->Prepare = RndFilePrepare;
if (Context != NULL) {
+ ZeroMem(rnd, sizeof(DCS_RND));
+ rnd->Type = RndTypeFile;
+ rnd->GetBytes = RndFileGetBytes;
+ rnd->Prepare = RndFilePrepare;
rnd->State.File.Data = Context;
rnd->State.File.Size = ContextSize;
+ res = EFI_SUCCESS;
}
return res;
}