[sr-dev] git:4.3:ad6916e6: core: clist - restet prev/next when removing from clist slot

Daniel-Constantin Mierla miconda at gmail.com
Mon Nov 16 12:03:27 CET 2015


Module: kamailio
Branch: 4.3
Commit: ad6916e60745da509cc74b8a4b576d8530b73361
URL: https://github.com/kamailio/kamailio/commit/ad6916e60745da509cc74b8a4b576d8530b73361

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-11-16T11:49:16+01:00

core: clist - restet prev/next when removing from clist slot

(cherry picked from commit 0fbcca38574139f1cd8ba7506ee5e204be5f2da7)

---

Modified: clist.h

---

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

---

diff --git a/clist.h b/clist.h
index 2f1f8b5..2b796e6 100644
--- a/clist.h
+++ b/clist.h
@@ -87,7 +87,9 @@
 #define clist_rm_sublist(s, e, next, prev) \
 	do{\
 		(s)->prev->next=(e)->next;  \
-		(e)->next->prev=(s)->prev ; \
+		(e)->next->prev=(s)->prev;  \
+		(s)->prev=NULL; \
+		(e)->next=NULL; \
 	}while(0)
 
 




More information about the sr-dev mailing list