Module: sip-router
Branch: master
Commit: f05a578613ca1c9cc15e27cc01c5573e1cf0b888
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f05a578613ca1c9cc15e27cc01c5573e1cf0b888

Author: Marius Zbihlei <[email protected]>
Committer: Marius Zbihlei <[email protected]>
Date:   Wed Jun 16 14:11:48 2010 +0300

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.

---

 lib/trie/dtrie.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/trie/dtrie.c b/lib/trie/dtrie.c
index 62e0cc9..531340b 100644
--- a/lib/trie/dtrie.c
+++ b/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);


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to