[sr-dev] git:master:b123dec9: pike: safety check for ll variable

Daniel-Constantin Mierla miconda at gmail.com
Tue Apr 13 09:51:08 CEST 2021


Module: kamailio
Branch: master
Commit: b123dec934769522407dad619bbb6c2074719884
URL: https://github.com/kamailio/kamailio/commit/b123dec934769522407dad619bbb6c2074719884

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-04-13T09:50:07+02:00

pike: safety check for ll variable

---

Modified: src/modules/pike/pike_funcs.c

---

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

---

diff --git a/src/modules/pike/pike_funcs.c b/src/modules/pike/pike_funcs.c
index 42fc5172e4..3096928d5d 100644
--- a/src/modules/pike/pike_funcs.c
+++ b/src/modules/pike/pike_funcs.c
@@ -245,8 +245,10 @@ void clean_routine(unsigned int ticks , void *param)
 
 			/* unlink the node -> the list will get shorter and it will be
 			 * faster for the next branches to process it */
-			ll->prev->prev->next = ll;
-			ll->prev = ll->prev->prev;
+			if(ll) {
+				ll->prev->prev->next = ll;
+				ll->prev = ll->prev->prev;
+			}
 			node->expires = 0;
 			node->timer_ll.prev = node->timer_ll.next = 0;
 			if ( node->flags&NODE_EXPIRED_FLAG )




More information about the sr-dev mailing list