Windows: various fixes following Coverity analysis.

This commit is contained in:
Mounir IDRASSI committed 2017-06-11 17:28:22 +02:00
1 parent 70d083bfb2
commit ce2aa639f4
6 files changed
+184 -109

No files matched your search

+3 -2
View File
@@ -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: