FreeRADIUS 1.1.1 Segmentation fault on Fedora 4

Alan DeKok aland at nitros9.org
Tue May 9 20:18:56 CEST 2006


Bjarni Hardarson <freeradius at hardarson.se> wrote:
...

  After a bit of looking, it appears there are other problems.  Here's
a patch that may help.  No idea if it solves this problem, but the
current code looks buggy.

  Alan DeKok.

Index: src/modules/rlm_eap/mem.c
===================================================================
RCS file: /source/radiusd/src/modules/rlm_eap/mem.c,v
retrieving revision 1.14.4.1
diff -u -r1.14.4.1 mem.c
--- src/modules/rlm_eap/mem.c	6 Feb 2006 16:23:51 -0000	1.14.4.1
+++ src/modules/rlm_eap/mem.c	9 May 2006 18:24:19 -0000
@@ -223,8 +223,11 @@
 		if (prev) {
 			prev->next = handler;
 			handler->prev = prev;
+			handler->next = NULL;
+			inst->session_tail = handler;
 		} else {
 			inst->session_head = inst->session_tail = handler;
+			handler->next = handler->prev = NULL;
 		}
 	}
 
@@ -331,12 +334,12 @@
 			if (handler->prev) {
 				handler->prev->next = handler->next;
 			} else {
-				inst->session_head = NULL;
+				inst->session_head = handler->next;
 			}
 			if (handler->next) {
 				handler->next->prev = handler->prev;
 			} else {
-				inst->session_tail = NULL;
+				inst->session_tail = handler->prev;
 			}
 			handler->prev = handler->next = NULL;
 		}




More information about the Freeradius-Users mailing list