mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
3f035cb3cc
Fix a path where tal_free is called on an uninitialized variable If the first `goto bad_total` executes, then that path has uninitialized `short_route` but bad_total passes through to `out` whose first call is tal_free(short_route). This was noticed by a maybe-uninitialized heuristic on gcc 7.4.0: gossipd/routing.c: In function ‘find_shorter_route’: gossipd/routing.c:1096:2: error: ‘short_route’ may be used uninitialized in this function [-Werror=maybe-uninitialized] tal_free(short_route); Reported-by: @ZmnSCPxj <https://github.com/ElementsProject/lightning/pull/2674#issuecomment-495617253> Signed-off-by: William Casarin <jb55@jb55.com> |
||
---|---|---|
.. | ||
test | ||
broadcast.c | ||
broadcast.h | ||
gossip_constants.h | ||
gossip_peerd_wire.csv | ||
gossip_store.c | ||
gossip_store.csv | ||
gossip_store.h | ||
gossip_wire.csv | ||
gossipd.c | ||
Makefile | ||
routing.c | ||
routing.h |