mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-03 13:14:22 +01:00
gossipd: fix listnodes crash on non existing id
'node_arr' was not instanciated if an id was passed to listnodes and we could not get a node from it
This commit is contained in:
committed by
Christian Decker
parent
d054fef0f0
commit
d9db9dc1ae
@@ -2220,8 +2220,10 @@ static struct io_plan *getnodes(struct io_conn *conn, struct daemon *daemon,
|
||||
struct gossip_getnodes_entry,
|
||||
1);
|
||||
add_node_entry(node_arr, daemon, n, &node_arr[0]);
|
||||
} else
|
||||
} else {
|
||||
nodes = NULL;
|
||||
node_arr = NULL;
|
||||
}
|
||||
} else {
|
||||
struct node_map_iter it;
|
||||
size_t i = 0;
|
||||
|
||||
Reference in New Issue
Block a user