فهرست منبع

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