瀏覽代碼

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);