Skip to content

Commit 783466e

Browse files
simonqhughesMika Karjalainen
authored andcommitted
Restoring swap code to cfstore_test_delete_all() after being previously removed to work around CFSTORE issue 17/23 (realloc()).
1 parent 7ee419f commit 783466e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

features/storage/FEATURE_STORAGE/cfstore/source/cfstore_test.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,11 +374,7 @@ int32_t cfstore_test_delete_all(void)
374374
CFSTORE_ERRLOG("%s:Error: failed to delete key_name=%s, len=%d\r\n", __func__, key_name, (int) len);
375375
return ret;
376376
}
377-
ret = drv->Close(next);
378-
if(ret < ARM_DRIVER_OK){
379-
CFSTORE_ERRLOG("%s:Error: failed to close key_name=%s, len=%d\r\n", __func__, key_name, (int) len);
380-
return ret;
381-
}
377+
CFSTORE_HANDLE_SWAP(prev, next);
382378
}
383379
if(ret == ARM_CFSTORE_DRIVER_ERROR_KEY_NOT_FOUND) {
384380
/* as expected, no more keys have been found by the Find()*/

0 commit comments

Comments
 (0)