Module: kamailio
Branch: master
Commit: f42e5420f5f761bd08952b221a3f60ac925d6c99
URL:
https://github.com/kamailio/kamailio/commit/f42e5420f5f761bd08952b221a3f60a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-06-20T08:32:00+02:00
ims_charging: check if the session to be linked is actually part of list
- issue reported and patch suggested by GH #1549
---
Modified: src/modules/ims_charging/ro_session_hash.h
---
Diff:
https://github.com/kamailio/kamailio/commit/f42e5420f5f761bd08952b221a3f60a…
Patch:
https://github.com/kamailio/kamailio/commit/f42e5420f5f761bd08952b221a3f60a…
---
diff --git a/src/modules/ims_charging/ro_session_hash.h
b/src/modules/ims_charging/ro_session_hash.h
index 4b677b3c0a..b81e843245 100644
--- a/src/modules/ims_charging/ro_session_hash.h
+++ b/src/modules/ims_charging/ro_session_hash.h
@@ -158,6 +158,13 @@ extern struct ro_session_table *ro_session_table;
* \param ro_session unlinked ro_session
*/
static inline void unlink_unsafe_ro_session(struct ro_session_entry *ro_session_entry,
struct ro_session *ro_session) {
+ if ((ro_session->next == 0x00) &&
+ (ro_session->prev == 0x00) &&
+ (ro_session != ro_session_entry->first) )
+ {
+ return;
+ }
+
if (ro_session->next)
ro_session->next->prev = ro_session->prev;
else