From ed9f661e075f889074a12769c2b12e9a86fde2e7 Mon Sep 17 00:00:00 2001 From: niftynei Date: Tue, 15 Sep 2020 20:31:57 -0500 Subject: [PATCH] dual_open: memleak problem with fee_states --- lightningd/dual_open_control.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lightningd/dual_open_control.c b/lightningd/dual_open_control.c index 112873795..c2327a4c1 100644 --- a/lightningd/dual_open_control.c +++ b/lightningd/dual_open_control.c @@ -679,7 +679,11 @@ wallet_commit_channel(struct lightningd *ld, return NULL; } - channel_info->fee_states = new_fee_states(uc, opener, &feerate); + /* This is actually correct, it's stolen onto + * channel in `new_channel` */ + channel_info->fee_states = take(new_fee_states(NULL, + opener, + &feerate)); /* old_remote_per_commit not valid yet, copy valid one. */ channel_info->old_remote_per_commit = channel_info->remote_per_commit;