mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
json_getroute: don't leak.
Allocate the route off the current command, not dstate. And in the case where the route is somehow not via a peer, don't leak memory. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -67,7 +67,8 @@ struct node_connection *add_connection(struct lightningd_state *dstate,
|
||||
void remove_connection(struct lightningd_state *dstate,
|
||||
const struct pubkey *src, const struct pubkey *dst);
|
||||
|
||||
struct peer *find_route(struct lightningd_state *dstate,
|
||||
struct peer *find_route(const tal_t *ctx,
|
||||
struct lightningd_state *dstate,
|
||||
const struct pubkey *to,
|
||||
u64 msatoshi,
|
||||
double riskfactor,
|
||||
|
||||
Reference in New Issue
Block a user