Browse Source

gossip: Duplicate removes can result in null pointers in broadcast

Signed-off-by: Christian Decker <decker.christian@gmail.com>
ppa-0.6.1
Christian Decker 7 years ago
parent
commit
4e7fc99ae1
  1. 2
      gossipd/broadcast.c

2
gossipd/broadcast.c

@ -33,9 +33,11 @@ struct broadcast_state *new_broadcast_state(tal_t *ctx)
void broadcast_del(struct broadcast_state *bstate, u64 index, const u8 *payload)
{
const struct queued_message *q = uintmap_del(&bstate->broadcasts, index);
if (q != NULL) {
assert(q->payload == payload);
broadcast_state_check(bstate, "broadcast_del");
}
}
static void destroy_queued_message(struct queued_message *msg,
struct broadcast_state *bstate)

Loading…
Cancel
Save