mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
pay: Fix a memory leak when retrying getroute
This commit is contained in:
committed by
neil saitug
parent
645b1b505b
commit
2632cddfe4
@@ -809,6 +809,10 @@ static struct command_result *payment_getroute(struct payment *p)
|
||||
const char *errstr;
|
||||
struct gossmap *gossmap;
|
||||
|
||||
/* If we retry the getroute call we might already have a route, so
|
||||
* free an eventual stale route. */
|
||||
p->route = tal_free(p->route);
|
||||
|
||||
gossmap = get_gossmap(p->plugin);
|
||||
|
||||
dst = gossmap_find_node(gossmap, p->getroute->destination);
|
||||
|
||||
Reference in New Issue
Block a user