Browse Source

Allocate off ctx instead of tmpctx in encode_short_channel_ids_start(const tal_t *ctx)

ppa-0.6.1
practicalswift 7 years ago
committed by Rusty Russell
parent
commit
7969cc335e
  1. 2
      gossipd/gossip.c

2
gossipd/gossip.c

@ -197,7 +197,7 @@ static struct peer *find_peer(struct daemon *daemon, const struct pubkey *id)
static u8 *encode_short_channel_ids_start(const tal_t *ctx) static u8 *encode_short_channel_ids_start(const tal_t *ctx)
{ {
u8 *encoded = tal_arr(tmpctx, u8, 0); u8 *encoded = tal_arr(ctx, u8, 0);
towire_u8(&encoded, SHORTIDS_ZLIB); towire_u8(&encoded, SHORTIDS_ZLIB);
return encoded; return encoded;
} }

Loading…
Cancel
Save