Browse code

core: startup socket list fix

Fix crash on startup when dealing with consecutive duplicate
socket ("listen") addresses.

Andrei Pelinescu-Onciul authored on 15/07/2009 00:11:40
Showing 1 changed files
... ...
@@ -1077,7 +1077,9 @@ static int fix_socket_list(struct socket_info **list, int* type_flags)
1077 1077
 					)
1078 1078
 					add_alias(del_si->name.s, del_si->name.len,
1079 1079
 								l->port_no, l->proto);
1080
-						
1080
+				/* make sure next_si doesn't point to del_si */
1081
+				if (del_si==next_si)
1082
+					next_si=next_si->next;
1081 1083
 				/* remove del_si*/
1082 1084
 				sock_listrm(list, del_si);
1083 1085
 				free_sock_info(del_si);