Browse Source

fromwire_bitcoin_tx: quieten leak reporting.

We create a temporary tx which is a child of the real tx, for simplicity of
marshalling.  That's OK.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
795a03e8c4
  1. 1
      channeld/Makefile
  2. 1
      closingd/Makefile
  3. 6
      common/htlc_wire.c
  4. 1
      onchaind/Makefile
  5. 1
      openingd/Makefile

1
channeld/Makefile

@ -49,6 +49,7 @@ CHANNELD_COMMON_OBJS := \
common/io_debug.o \
common/keyset.o \
common/key_derive.o \
common/memleak.o \
common/msg_queue.o \
common/ping.o \
common/peer_failed.o \

1
closingd/Makefile

@ -51,6 +51,7 @@ CLOSINGD_COMMON_OBJS := \
common/dev_disconnect.o \
common/derive_basepoints.o \
common/htlc_wire.o \
common/memleak.o \
common/msg_queue.o \
common/peer_failed.o \
common/permute_tx.o \

6
common/htlc_wire.c

@ -2,6 +2,7 @@
#include <ccan/array_size/array_size.h>
#include <ccan/crypto/shachain/shachain.h>
#include <common/htlc_wire.h>
#include <common/memleak.h>
#include <wire/wire.h>
/* FIXME: We could adapt tools/generate-wire.py to generate structures
@ -147,6 +148,9 @@ void fromwire_bitcoin_tx(const u8 **cursor, size_t *max, struct bitcoin_tx *tx)
* for the sake of simple structures, we don't write the
* generator that way. */
struct bitcoin_tx *tx2 = pull_bitcoin_tx(tx, cursor, max);
if (tx2)
if (tx2) {
*tx = *tx2;
/* This hangs around with tx until freed */
notleak(tx2);
}
}

1
onchaind/Makefile

@ -56,6 +56,7 @@ ONCHAIND_COMMON_OBJS := \
common/initial_commit_tx.o \
common/keyset.o \
common/key_derive.o \
common/memleak.o \
common/msg_queue.o \
common/permute_tx.o \
common/status.o \

1
openingd/Makefile

@ -50,6 +50,7 @@ OPENINGD_COMMON_OBJS := \
common/initial_commit_tx.o \
common/key_derive.o \
common/keyset.o \
common/memleak.o \
common/msg_queue.o \
common/ping.o \
common/peer_failed.o \

Loading…
Cancel
Save