mirror of https://github.com/ARMmbed/mbed-os.git
Fix cfstore_test_delete_all by removing swap
Remove the handle swap in cfstore_test_delete_all. This prevents a deleted handle from being used.pull/2442/head
parent
6a31ffbf3e
commit
81859050c3
|
@ -374,7 +374,11 @@ int32_t cfstore_test_delete_all(void)
|
|||
CFSTORE_ERRLOG("%s:Error: failed to delete key_name=%s, len=%d\r\n", __func__, key_name, (int) len);
|
||||
return ret;
|
||||
}
|
||||
CFSTORE_HANDLE_SWAP(prev, next);
|
||||
ret = drv->Close(next);
|
||||
if(ret < ARM_DRIVER_OK){
|
||||
CFSTORE_ERRLOG("%s:Error: failed to close key_name=%s, len=%d\r\n", __func__, key_name, (int) len);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
if(ret == ARM_CFSTORE_DRIVER_ERROR_KEY_NOT_FOUND) {
|
||||
/* as expected, no more keys have been found by the Find()*/
|
||||
|
|
Loading…
Reference in New Issue