mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 14:44:16 +01:00
pull_bitcoin_tx: allocate outputs off tx itself.
All the members of the transaction should be allocated off the transaction, as they have the same lifetime. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
3a803eefbb
commit
7cf786f1f4
@ -421,7 +421,7 @@ static struct bitcoin_tx *pull_bitcoin_tx(const tal_t *ctx,
|
||||
tx->fee = pull_le64(cursor, max);
|
||||
|
||||
tx->output_count = pull_varint(cursor, max);
|
||||
tx->output = tal_arr(ctx, struct bitcoin_tx_output, tx->output_count);
|
||||
tx->output = tal_arr(tx, struct bitcoin_tx_output, tx->output_count);
|
||||
for (i = 0; i < tx->output_count; i++)
|
||||
pull_output(tx, cursor, max, tx->output + i);
|
||||
tx->lock_time = pull_le32(cursor, max);
|
||||
|
Loading…
Reference in New Issue
Block a user