lightningd: fix overzealous memleak report.

Found by CI, not a real leak.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2025-02-24 15:27:19 +10:30
parent 08210dab47
commit 04b21c34d3

View File

@@ -2332,7 +2332,7 @@ static void json_add_peer(struct lightningd *ld,
/* If peer reports our IP remote_addr, add that here */
if (p->remote_addr)
json_add_string(response, "remote_addr",
fmt_wireaddr(response, p->remote_addr));
fmt_wireaddr(tmpctx, p->remote_addr));
}
/* Note: If !PEER_CONNECTED, peer may use different features on reconnect */