MCPcopy Create free account
hub / github.com/ElementsProject/lightning / handle_memleak

Function handle_memleak

hsmd/hsmd.c:631–654  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

629}
630
631static struct io_plan *handle_memleak(struct io_conn *conn,
632 struct client *c,
633 const u8 *msg_in)
634{
635 struct htable *memtable;
636 bool found_leak;
637 u8 *reply;
638
639 memtable = memleak_start(tmpctx);
640 memleak_ptr(memtable, msg_in);
641
642 /* Now note clients and anything they point to. */
643 memleak_scan_region(memtable, dbid_zero_clients, sizeof(dbid_zero_clients));
644 memleak_scan_uintmap(memtable, &clients);
645 memleak_scan_obj(memtable, status_conn);
646 memleak_scan_obj(memtable, hsm_secret);
647
648 memleak_ptr(memtable, dev_force_privkey);
649 memleak_ptr(memtable, dev_force_bip32_seed);
650
651 found_leak = dump_memleak(memtable, memleak_status_broken, NULL);
652 reply = towire_hsmd_dev_memleak_reply(NULL, found_leak);
653 return req_reply(conn, c, take(reply));
654}
655
656u8 *hsmd_status_bad_request(struct hsmd_client *client, const u8 *msg, const char *error)
657{

Callers 1

handle_clientFunction · 0.85

Calls 5

memleak_scan_regionFunction · 0.85
req_replyFunction · 0.85
memleak_startFunction · 0.50
memleak_ptrFunction · 0.50
memleak_scan_objFunction · 0.50

Tested by

no test coverage detected