summaryrefslogtreecommitdiffstats
path: root/src/libnetdata/dictionary/dictionary.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnetdata/dictionary/dictionary.c')
-rw-r--r--src/libnetdata/dictionary/dictionary.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libnetdata/dictionary/dictionary.c b/src/libnetdata/dictionary/dictionary.c
index 9d50ed62c..ebe67269a 100644
--- a/src/libnetdata/dictionary/dictionary.c
+++ b/src/libnetdata/dictionary/dictionary.c
@@ -318,10 +318,11 @@ static void dictionary_queue_for_destruction(DICTIONARY *dict) {
}
void cleanup_destroyed_dictionaries(void) {
- if(!dictionaries_waiting_to_be_destroyed)
- return;
-
netdata_mutex_lock(&dictionaries_waiting_to_be_destroyed_mutex);
+ if (!dictionaries_waiting_to_be_destroyed) {
+ netdata_mutex_unlock(&dictionaries_waiting_to_be_destroyed_mutex);
+ return;
+ }
DICTIONARY *dict, *last = NULL, *next = NULL;
for(dict = dictionaries_waiting_to_be_destroyed; dict ; dict = next) {
@@ -497,8 +498,8 @@ static DICTIONARY *dictionary_create_internal(DICT_OPTIONS options, struct dicti
else
dict->value_aral = NULL;
- if(!(dict->options & (DICT_OPTION_INDEX_JUDY|DICT_OPTION_INDEX_HASHTABLE)))
- dict->options |= DICT_OPTION_INDEX_JUDY;
+// if(!(dict->options & (DICT_OPTION_INDEX_JUDY|DICT_OPTION_INDEX_HASHTABLE)))
+ dict->options |= DICT_OPTION_INDEX_JUDY;
size_t dict_size = 0;
dict_size += sizeof(DICTIONARY);