broadcast: don't leak in broadcast_del.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-08-24 14:50:06 +09:30 committed by Christian Decker
parent 5d1f71c3c0
commit f80955c932

View file

@ -36,6 +36,7 @@ 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);
tal_free(q);
broadcast_state_check(bstate, "broadcast_del");
}
}