mirror of
https://github.com/espressif/openthread.git
synced 2026-11-04 05:23:14 +00:00
Ensure DataSet:Restore() clears the data set (in case of failure) (#1143)
This commit is contained in:
committed by
Jonathan Hui
parent
c943da9b4b
commit
d841a7c059
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user