If we're going to assert that logData != NULL, do it before we

try to dereference logData.

Reported by:	"Ted Unangst" <tedu@coverity.com>
Approved by:	rwatson (mentor), scottl
This commit is contained in:
cperciva 2004-02-22 01:08:33 +00:00
parent ae73820125
commit d3deac34ea

View File

@ -690,9 +690,9 @@ rf_ParityLogAppend(
* *
* NON-BLOCKING */ * NON-BLOCKING */
RF_ASSERT(logData != NULL);
raidPtr = logData->common->raidPtr; raidPtr = logData->common->raidPtr;
/* lock the region for the first item in logData */ /* lock the region for the first item in logData */
RF_ASSERT(logData != NULL);
regionID = logData->regionID; regionID = logData->regionID;
RF_LOCK_MUTEX(raidPtr->regionInfo[regionID].mutex); RF_LOCK_MUTEX(raidPtr->regionInfo[regionID].mutex);
RF_ASSERT(raidPtr->regionInfo[regionID].loggingEnabled); RF_ASSERT(raidPtr->regionInfo[regionID].loggingEnabled);