mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-20 13:54:36 +01:00
log: mark ltmp as notleak.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
e64320c76c
commit
4957921e02
3 changed files with 9 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <ccan/str/hex/hex.h>
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <ccan/time/time.h>
|
||||
#include <common/memleak.h>
|
||||
#include <common/pseudorand.h>
|
||||
#include <common/utils.h>
|
||||
#include <errno.h>
|
||||
|
@ -112,7 +113,7 @@ struct log_book *new_log_book(const tal_t *ctx,
|
|||
|
||||
/* In case ltmp not initialized, do so now. */
|
||||
if (!ltmp)
|
||||
ltmp = tal(lr, char);
|
||||
ltmp = notleak(tal(lr, char));
|
||||
|
||||
return lr;
|
||||
}
|
||||
|
@ -195,7 +196,7 @@ static void add_entry(struct log *log, struct log_entry *l)
|
|||
/* Free up temporaries now if any */
|
||||
if (tal_first(ltmp)) {
|
||||
tal_free(ltmp);
|
||||
ltmp = tal(log->lr, char);
|
||||
ltmp = notleak(tal(log->lr, char));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,9 @@ static void db_fatal(const char *fmt, ...);
|
|||
/* Generated stub for memleak_scan_region */
|
||||
void memleak_scan_region(struct htable *memtable UNNEEDED, const void *p UNNEEDED)
|
||||
{ fprintf(stderr, "memleak_scan_region called!\n"); abort(); }
|
||||
/* Generated stub for notleak_ */
|
||||
void *notleak_(const void *ptr UNNEEDED, bool plus_children UNNEEDED)
|
||||
{ fprintf(stderr, "notleak_ called!\n"); abort(); }
|
||||
/* AUTOGENERATED MOCKS END */
|
||||
|
||||
static char *db_err;
|
||||
|
|
|
@ -19,6 +19,9 @@ static void wallet_fatal(const char *fmt, ...);
|
|||
/* Generated stub for memleak_scan_region */
|
||||
void memleak_scan_region(struct htable *memtable UNNEEDED, const void *p UNNEEDED)
|
||||
{ fprintf(stderr, "memleak_scan_region called!\n"); abort(); }
|
||||
/* Generated stub for notleak_ */
|
||||
void *notleak_(const void *ptr UNNEEDED, bool plus_children UNNEEDED)
|
||||
{ fprintf(stderr, "notleak_ called!\n"); abort(); }
|
||||
/* AUTOGENERATED MOCKS END */
|
||||
|
||||
static char *wallet_err;
|
||||
|
|
Loading…
Add table
Reference in a new issue