mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
common: add tal_gather_wally() function to reparent libwally objs.
This lets us reduce leaks, and ease their detection. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -84,6 +84,9 @@ void setup_tmpctx(void);
|
||||
/* Free any children of tmpctx. */
|
||||
void clean_tmpctx(void);
|
||||
|
||||
/* Steal any wally allocations onto this context. */
|
||||
void tal_gather_wally(const tal_t *ctx);
|
||||
|
||||
/* Define sha256_eq. */
|
||||
STRUCTEQ_DEF(sha256, 0, u);
|
||||
|
||||
@@ -106,4 +109,7 @@ STRUCTEQ_DEF(ripemd160, 0, u);
|
||||
#define IFDEV(dev, nondev) (nondev)
|
||||
#endif
|
||||
|
||||
/* Context which all wally allocations use (see common/setup.c) */
|
||||
extern const tal_t *wally_tal_ctx;
|
||||
|
||||
#endif /* LIGHTNING_COMMON_UTILS_H */
|
||||
|
||||
Reference in New Issue
Block a user