summaryrefslogtreecommitdiffstats
path: root/src/libnetdata/dictionary/dictionary.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 17:33:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 17:34:10 +0000
commit83ba6762cc43d9db581b979bb5e3445669e46cc2 (patch)
tree2e69833b43f791ed253a7a20318b767ebe56cdb8 /src/libnetdata/dictionary/dictionary.c
parentReleasing debian version 1.47.5-1. (diff)
downloadnetdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.tar.xz
netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.zip
Merging upstream version 2.0.3+dfsg (Closes: #923993, #1042533, #1045145).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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);