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
Russ Butler 2016-10-16 20:19:49 -05:00
parent c908666d63
commit 9f0e756e28
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}