diff --git a/src/utils_cache.c b/src/utils_cache.c
index 241aa726c55bf775159f96b7b448b68f574ae8fe..b2f2c36b7223b87b53266ed121c3bdc9bc1a27ed 100644 (file)
--- a/src/utils_cache.c
+++ b/src/utils_cache.c
ce = cache_alloc (ds->ds_num);
if (ce == NULL)
{
+ sfree (key_copy);
ERROR ("uc_insert: cache_alloc (%i) failed.", ds->ds_num);
return (-1);
}
{
ERROR ("uc_purge: realloc failed.");
c_avl_iterator_destroy (iter);
+ pthread_mutex_unlock (&cache_lock);
return (-1);
}
/* This is important - the caller has no other way of knowing how many
* values are returned. */
- if (ret_num != ds->ds_num)
+ if (ret_num != (size_t) ds->ds_num)
{
ERROR ("utils_cache: uc_get_rate: ds[%s] has %i values, "
"but uc_get_rate_by_name returned %zu.",