From 6c951bf7e011c23312ee97b9c9723bd551a53e7b Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 15 Dec 2017 20:52:57 +1030 Subject: [PATCH] invoice: move link to the top of the structure. memleak doesn't detect pointers to within an object, only pointers to their exact address (it's simpler this way). Moving the linked list to the top of the structure means it can follow the chain. Signed-off-by: Rusty Russell --- lightningd/invoice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightningd/invoice.h b/lightningd/invoice.h index 2a2473e25..e4b45d145 100644 --- a/lightningd/invoice.h +++ b/lightningd/invoice.h @@ -17,9 +17,9 @@ enum invoice_status { }; struct invoice { + struct list_node list; u64 id; enum invoice_status state; - struct list_node list; const char *label; u64 msatoshi; struct preimage r;