lightningd: add code to search strmaps for memleak detection.

Didn't put this in common/memleak because only lightningd currently needs it
(as of next patch).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-02-04 21:25:42 +10:30
parent c506d42679
commit e5c80f63d7
3 changed files with 26 additions and 0 deletions

View File

@@ -5,8 +5,16 @@
#include <stdbool.h>
struct command;
struct htable;
struct strmap;
struct subd;
void opening_memleak_done(struct command *cmd, struct subd *leaker);
void peer_memleak_done(struct command *cmd, struct subd *leaker);
/* Remove any pointers inside this strmap (which is opaque to memleak). */
#define memleak_remove_strmap(memtable, strmap) \
memleak_remove_strmap_((memtable), tcon_unwrap(strmap))
void memleak_remove_strmap_(struct htable *memtable, const struct strmap *m);
#endif /* LIGHTNING_LIGHTNINGD_MEMDUMP_H */