2
0
Эх сурвалжийг харах

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 жил өмнө
parent
commit
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);