Skip to content

Commit

Permalink
ims_charging: check if the session to be linked is actually part of list
Browse files Browse the repository at this point in the history
- issue reported and patch suggested by GH #1549
  • Loading branch information
miconda committed Jun 20, 2018
1 parent a0594f0 commit f42e542
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/modules/ims_charging/ro_session_hash.h
Expand Up @@ -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
Expand Down

0 comments on commit f42e542

Please sign in to comment.