Browse Source

gossipd/routing: free everything at end of tests.

valgrind complains, but using a destructor on the node map is a good
idea anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
9c35603275
  1. 1
      gossipd/routing.c
  2. 1
      gossipd/test/run-find_route-specific.c
  3. 1
      gossipd/test/run-find_route.c

1
gossipd/routing.c

@ -46,6 +46,7 @@ struct node_map *empty_node_map(const tal_t *ctx)
{
struct node_map *map = tal(ctx, struct node_map);
node_map_init(map);
tal_add_destructor(map, node_map_clear);
return map;
}

1
gossipd/test/run-find_route-specific.c

@ -120,5 +120,6 @@ int main(void)
assert(pubkey_eq(&route[0]->dst->id, &c));
tal_free(ctx);
secp256k1_context_destroy(secp256k1_ctx);
return 0;
}

1
gossipd/test/run-find_route.c

@ -123,5 +123,6 @@ int main(void)
assert(fee == 0 + 6);
tal_free(ctx);
secp256k1_context_destroy(secp256k1_ctx);
return 0;
}

Loading…
Cancel
Save