diff options
Diffstat (limited to 'src/Common/Format.c')
-rw-r--r-- | src/Common/Format.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Common/Format.c b/src/Common/Format.c index a7445a9d..cd211db7 100644 --- a/src/Common/Format.c +++ b/src/Common/Format.c @@ -163,11 +163,12 @@ int TCFormatVolume (volatile FORMAT_VOL_PARAMETERS *volParams) FormatSectorSize, FALSE); - if (nStatus != 0) + /* cryptoInfo sanity check to make Coverity happy eventhough it can't be NULL if nStatus = 0 */ + if ((nStatus != 0) || !cryptoInfo) { burn (header, sizeof (header)); VirtualUnlock (header, sizeof (header)); - return nStatus; + return nStatus? nStatus : ERR_OUTOFMEMORY; } begin_format: |