Ensure DataSet:Restore() clears the data set (in case of failure) (#1143)

This commit is contained in:
Abtin Keshavarzian
2017-01-13 09:10:53 -08:00
committed by Jonathan Hui
parent c943da9b4b
commit d841a7c059
+1 -4
View File
@@ -433,11 +433,8 @@ ThreadError Dataset::Restore(void)
error = otPlatSettingsGet(mInstance, static_cast<uint16_t>(mType == Tlv::kActiveTimestamp ? kKeyActiveDataset :
kKeyPendingDataset), 0, mTlvs, &length);
SuccessOrExit(error);
mLength = (error == kThreadError_None) ? length : 0;
mLength = length;
exit:
return error;
}