mirror of https://github.com/ARMmbed/mbed-os.git
CFSTORE - Delete handle even if key ref non zero
When closing a file handle remove the handle from the handle list regardless of what the reference count of the key it is pointing to is. This prevents config store from keeping a handle to file handles that have gone out of scope.pull/3035/head
parent
c908666d63
commit
9f0e756e28
|
@ -2458,12 +2458,12 @@ static int32_t cfstore_file_destroy(cfstore_file_t* file)
|
|||
if(cfstore_hkvt_get_flags_delete(&hkvt)){
|
||||
ret = cfstore_delete_ex(&hkvt);
|
||||
}
|
||||
}
|
||||
/* reset client buffer to empty ready for reuse */
|
||||
/* delete the file even if not deleting the KV*/
|
||||
cfstore_listDel(&file->node);
|
||||
memset(file, 0, sizeof(cfstore_file_t));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue