Преглед изворни кода

Always set data payload to NULL, thus avoiding problems when root node had data associated with it
Credits for the patch go to Henning Westerholt.
(cherry picked from commit f05a578613ca1c9cc15e27cc01c5573e1cf0b888)

Marius Zbihlei пре 15 година
родитељ
комит
268c9e7db0
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      lib/trie/dtrie.c

+ 2 - 2
lib/trie/dtrie.c

@@ -87,9 +87,9 @@ void dtrie_delete(struct dtrie_node_t *root, struct dtrie_node_t *node,
 
 	if (delete_payload) {
 		delete_payload(node->data);
-		node->data = NULL;
 	}
-
+	node->data = NULL;
+	
 	if (node != root) {
 		LM_DBG("free node at %p\n", node);
 		shm_free(node);