Module: kamailio
Branch: 5.6
Commit: d97c59a15bf6634d28998b3a0fa4acc845b70fa2
URL:
https://github.com/kamailio/kamailio/commit/d97c59a15bf6634d28998b3a0fa4acc…
Author: Victor Seva <vseva(a)sipwise.com>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2022-07-06T09:37:34+02:00
tm: check T just in case before UNREF
Related #3156
(cherry picked from commit dedd7ee2ddcb92b020ea40a074008a317a9553f5)
---
Modified: src/modules/tm/t_funcs.h
---
Diff:
https://github.com/kamailio/kamailio/commit/d97c59a15bf6634d28998b3a0fa4acc…
Patch:
https://github.com/kamailio/kamailio/commit/d97c59a15bf6634d28998b3a0fa4acc…
---
diff --git a/src/modules/tm/t_funcs.h b/src/modules/tm/t_funcs.h
index 6830b13208..dbbdc1960a 100644
--- a/src/modules/tm/t_funcs.h
+++ b/src/modules/tm/t_funcs.h
@@ -110,7 +110,7 @@ int send_pr_buffer( struct retr_buf *rb, void *buf, int len);
#define UNREF_NOSTATS(_T_cell) \
do{\
- if (atomic_dec_and_test(&(_T_cell)->ref_count)){ \
+ if (_T_cell && atomic_dec_and_test(&(_T_cell)->ref_count)){ \
unlink_timers((_T_cell)); \
free_cell((_T_cell)); \
}\