mirror of https://github.com/sipwise/kamailio.git
parent
e50bf8b61a
commit
2bd85490c7
@ -0,0 +1,21 @@
|
||||
From: Victor Seva <vseva@sipwise.com>
|
||||
Date: Mon, 4 Jul 2022 15:49:20 +0200
|
||||
Subject: tm: check T just in case before UNREF
|
||||
|
||||
---
|
||||
src/modules/tm/t_funcs.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/modules/tm/t_funcs.h b/src/modules/tm/t_funcs.h
|
||||
index 6830b13..dbbdc19 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)); \
|
||||
}\
|
Loading…
Reference in new issue