[sr-dev] git:4.3:7fc18d15: tm: reinit ref counter if attempting to free while still in wait timer

Daniel-Constantin Mierla miconda at gmail.com
Tue Jan 19 10:00:51 CET 2016


Module: kamailio
Branch: 4.3
Commit: 7fc18d15ce0cdcaf47127e5ef96a28a239ed4104
URL: https://github.com/kamailio/kamailio/commit/7fc18d15ce0cdcaf47127e5ef96a28a239ed4104

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-01-19T09:59:09+01:00

tm: reinit ref counter if attempting to free while still in wait timer

(cherry picked from commit c7e411edb3c68260d43f86ee6977d468c074836b)

---

Modified: modules/tm/h_table.c

---

Diff:  https://github.com/kamailio/kamailio/commit/7fc18d15ce0cdcaf47127e5ef96a28a239ed4104.diff
Patch: https://github.com/kamailio/kamailio/commit/7fc18d15ce0cdcaf47127e5ef96a28a239ed4104.patch

---

diff --git a/modules/tm/h_table.c b/modules/tm/h_table.c
index ea38de0..d492665 100644
--- a/modules/tm/h_table.c
+++ b/modules/tm/h_table.c
@@ -131,6 +131,7 @@ void free_cell_helper(tm_cell_t* dead_cell, int silent, const char *fname, unsig
 			LM_WARN("removed cell %p is still linked in hash table (%s:%u)\n",
 				dead_cell, fname, fline);
 			if(t_on_wait(dead_cell)) {
+				INIT_REF(dead_cell, 1);
 				LM_WARN("cell %p is still linked in wait timer (%s:%u)"
 						" - skip freeing now\n", dead_cell, fname, fline);
 				return;




More information about the sr-dev mailing list