cleanup: The failchannel is not tal-allocated when first assigned

This makes the copy on write redundant.
This commit is contained in:
Christian Decker 2019-11-11 18:33:04 +01:00
parent 27547ce8d4
commit 1cf3c12a81

View File

@ -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);