[OpenSIPS-Devel] [ opensips-Bugs-2688749 ] Orphaned list entries in localcache module

SourceForge.net noreply at sourceforge.net
Mon Mar 16 16:33:04 CET 2009


Bugs item #2688749, was opened at 2009-03-16 11:33
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2688749&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Phil D'Amore (ptdamore)
Assigned to: Nobody/Anonymous (nobody)
Summary: Orphaned list entries in localcache module

Initial Comment:
There is a corner case when deleting from the hash when the removed item is at the head of a particular hash bucket list.

This tends to cause a problem mostly in the functions localcache_clean and lcache_htable_remove_safe.  When these functions find the node to be deleted and it's at the head of the list, the head node is deleted, the entries pointer is NULL'd out, and the code stops right there, leaving any other nodes in that list orphaned forever.

The attached patch changes the structure of the list slightly to have an empty node at the head.  This eliminates corner cases in the code that walk/modify the list and also eliminates the memory leaks.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2688749&group_id=232389



More information about the Devel mailing list