From 1cf3c12a81779cc5deb7ae96f07c9b95f0ec85ad Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Mon, 11 Nov 2019 18:33:04 +0100 Subject: [PATCH] cleanup: The failchannel is not tal-allocated when first assigned This makes the copy on write redundant. --- wallet/wallet.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/wallet/wallet.c b/wallet/wallet.c index e7226e7f0..b9022725b 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -2443,11 +2443,7 @@ void wallet_payment_set_failinfo(struct wallet *wallet, db_bind_null(stmt, 4); if (failchannel) { - /* db_bind_short_channel_id requires the input - * channel to be tal-allocated... */ - struct short_channel_id *scid = tal(tmpctx, struct short_channel_id); - *scid = *failchannel; - db_bind_short_channel_id(stmt, 5, scid); + db_bind_short_channel_id(stmt, 5, failchannel); db_bind_int(stmt, 8, faildirection); } else { db_bind_null(stmt, 5);