- for (int i = 0; i < keys_len; i++) {
- key = NULL;
- ce = NULL;
-
- status = c_avl_remove(cache_tree, keys[i], (void *)&key, (void *)&ce);
- if (status != 0) {
- ERROR("uc_check_timeout: c_avl_remove (\"%s\") failed.", keys[i]);
- sfree(keys[i]);
+ for (size_t i = 0; i < expired_num; i++) {
+ char *key = NULL;
+ cache_entry_t *value = NULL;
+
+ if (c_avl_remove(cache_tree, expired[i].key, (void *)&key,
+ (void *)&value) != 0) {
+ ERROR("uc_check_timeout: c_avl_remove (\"%s\") failed.", expired[i].key);
+ sfree(expired[i].key);