Skip to content

Commit

Permalink
reestablish_tlvs: don't lose them btw tmpctx cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
niftynei committed Jul 9, 2021
1 parent 030d954 commit e364d06
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openingd/dualopend.c
Original file line number Diff line number Diff line change
Expand Up @@ -3488,7 +3488,7 @@ static void do_reconnect_dance(struct state *state)
struct pubkey remote_current_per_commit_point;
struct tx_state *tx_state = state->tx_state;
#if EXPERIMENTAL_FEATURES
struct tlv_channel_reestablish_tlvs *tlvs = tlv_channel_reestablish_tlvs_new(tmpctx);
struct tlv_channel_reestablish_tlvs *tlvs = tlv_channel_reestablish_tlvs_new(NULL);
#endif

/* BOLT #2:
Expand Down Expand Up @@ -3539,6 +3539,9 @@ static void do_reconnect_dance(struct state *state)
peer_wire_name(fromwire_peektype(msg)),
tal_hex(msg, msg));

#if EXPERIMENTAL_FEATURES
tal_free(tlvs);
#endif /* EXPERIMENTAL_FEATURES */
check_channel_id(state, &cid, &state->channel_id);

status_debug("Got dualopend reestablish commit=%"PRIu64
Expand Down

0 comments on commit e364d06

Please sign in to comment.