Fix crash when handling the ALRM signal.
In retry() the function do_outgoing_connection() is called, which can delete items from the connection_tree, so when walking the tree we must first save the pointer to the next item.
This commit is contained in:
parent
19be9cf715
commit
bce177767d
1 changed files with 3 additions and 2 deletions
|
@ -341,9 +341,10 @@ int reload_configuration(void) {
|
||||||
|
|
||||||
void retry(void) {
|
void retry(void) {
|
||||||
connection_t *c;
|
connection_t *c;
|
||||||
splay_node_t *node;
|
splay_node_t *node, *next;
|
||||||
|
|
||||||
for(node = connection_tree->head; node; node = node->next) {
|
for(node = connection_tree->head; node; node = next) {
|
||||||
|
next = node->next;
|
||||||
c = node->data;
|
c = node->data;
|
||||||
|
|
||||||
if(c->outgoing && !c->node) {
|
if(c->outgoing && !c->node) {
|
||||||
|
|
Loading…
Reference in a new issue