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>
This commit is contained in:
parent
ffaab09043
commit
9c35603275
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -123,5 +123,6 @@ int main(void)
|
|||
assert(fee == 0 + 6);
|
||||
|
||||
tal_free(ctx);
|
||||
secp256k1_context_destroy(secp256k1_ctx);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue