mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
cleanup: The failchannel is not tal-allocated when first assigned
This makes the copy on write redundant.
This commit is contained in:
parent
27547ce8d4
commit
1cf3c12a81
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user