mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
gossip: Duplicate removes can result in null pointers in broadcast
Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
4429c6e7cd
commit
4e7fc99ae1
@ -33,8 +33,10 @@ 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);
|
||||
assert(q->payload == payload);
|
||||
broadcast_state_check(bstate, "broadcast_del");
|
||||
if (q != NULL) {
|
||||
assert(q->payload == payload);
|
||||
broadcast_state_check(bstate, "broadcast_del");
|
||||
}
|
||||
}
|
||||
|
||||
static void destroy_queued_message(struct queued_message *msg,
|
||||
|
Loading…
Reference in New Issue
Block a user