mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 20:09:18 +01:00
common: fix uninitialized member in gossmap.
Wrote a test program which passed num_channel_updates_rejected as NULL (which we don't usually do), and valgrind complained: ``` ==1048302== Conditional jump or move depends on uninitialised value(s) ==1048302== at 0x118B90: update_channel (gossmap.c:550) ==1048302== by 0x119EEE: map_catchup (gossmap.c:663) ==1048302== by 0x11A299: load_gossip_store (gossmap.c:726) ==1048302== by 0x11A352: gossmap_load (gossmap.c:1052) ==1048302== by 0x125362: main (run-route-infloop.c:90) ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
d1101f416f
commit
0a7e6211df
1 changed files with 2 additions and 1 deletions
|
@ -1046,7 +1046,8 @@ struct gossmap *gossmap_load(const tal_t *ctx, const char *filename,
|
|||
*num_channel_updates_rejected = 0;
|
||||
map->cupdate_fail = cupdate_fail_inc_ctr;
|
||||
map->cb_arg = num_channel_updates_rejected;
|
||||
}
|
||||
} else
|
||||
map->cupdate_fail = NULL;
|
||||
map->unknown_record = NULL;
|
||||
|
||||
if (!load_gossip_store(map))
|
||||
|
|
Loading…
Add table
Reference in a new issue