core-lightning/lightningd
Rusty Russell e998a72ef6 lightningd: fix overzealous memleak detection in json_add_datastore.
The lifetime is bound to the response, but memleak gets upset if it
sees it.  Use the standard take() pattern insteas.

```
lightningd-5 2024-11-28T05:02:27.503Z **BROKEN** lightningd: MEMLEAK: 0x55b58f329338
lightningd-5 2024-11-28T05:02:27.503Z **BROKEN** lightningd:   label=common/utils.c:150:char[]
lightningd-5 2024-11-28T05:02:27.504Z **BROKEN** lightningd:   alloc:
lightningd-5 2024-11-28T05:02:27.585Z **BROKEN** lightningd:     ccan/ccan/tal/tal.c:488 (tal_alloc_)
lightningd-5 2024-11-28T05:02:27.586Z **BROKEN** lightningd:     ccan/ccan/tal/tal.c:517 (tal_alloc_arr_)
lightningd-5 2024-11-28T05:02:27.586Z **BROKEN** lightningd:     ccan/ccan/tal/tal.c:861 (tal_dup_)
lightningd-5 2024-11-28T05:02:27.586Z **BROKEN** lightningd:     common/utils.c:150 (utf8_str)
lightningd-5 2024-11-28T05:02:27.589Z **BROKEN** lightningd:     lightningd/datastore.c:23 (json_add_datastore)
lightningd-5 2024-11-28T05:02:27.589Z **BROKEN** lightningd:     lightningd/datastore.c:205 (json_datastore)
lightningd-5 2024-11-28T05:02:27.590Z **BROKEN** lightningd:     lightningd/jsonrpc.c:808 (command_exec)
lightningd-5 2024-11-28T05:02:27.590Z **BROKEN** lightningd:     lightningd/jsonrpc.c:954 (rpc_command_hook_final)
lightningd-5 2024-11-28T05:02:27.590Z **BROKEN** lightningd:     lightningd/plugin_hook.c:196 (plugin_hook_call_next)
lightningd-5 2024-11-28T05:02:27.591Z **BROKEN** lightningd:     lightningd/plugin_hook.c:183 (plugin_hook_callback)
lightningd-5 2024-11-28T05:02:27.593Z **BROKEN** lightningd:     lightningd/plugin.c:663 (plugin_response_handle)
lightningd-5 2024-11-28T05:02:27.593Z **BROKEN** lightningd:     lightningd/plugin.c:775 (plugin_read_json_one)
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-12-20 15:36:07 +10:30
..
test common: don't send trace messages by default, don't ratelimit at all. 2024-12-16 09:48:51 +10:30
.gitignore
anchorspend.c lightningd: --dev-low-prio-anchor-blocks and test for low-priority anchors. 2024-11-26 14:49:36 +10:30
anchorspend.h
bitcoind.c lightningd: pass explicit context for bitcoind request functions. 2024-06-24 17:26:11 +09:30
bitcoind.h lightningd: pass explicit context for bitcoind request functions. 2024-06-24 17:26:11 +09:30
chaintopology.c lightningd: handle duplicate watches on the same thing correctly. 2024-08-13 07:25:02 -07:00
chaintopology.h chaintopology: free outstanding requests so we don't get responses while shutting down. 2024-06-24 17:26:11 +09:30
channel_control.c connectd: reconnect for non-transient connections. 2024-11-25 15:39:13 +10:30
channel_control.h common: No longer support new channels without option_static_remotekey. 2024-06-19 15:54:24 +09:30
channel_gossip.c lightningd: always broadcast our own gossip when it changes. 2024-08-12 16:30:29 +09:30
channel_gossip.h lightingd: corrections from Alex Myers's review. 2024-01-31 14:47:33 +10:30
channel_state.h lightningd: rename state_change_entry to channel_state_change, and use pointers. 2024-09-21 06:20:18 +09:30
channel.c lightningd: remember when we started closing channel. 2024-11-26 14:49:36 +10:30
channel.h lightningd: remember when we started closing channel. 2024-11-26 14:49:36 +10:30
closed_channel.c common/amount: rename amount_sat_zero/amount_msat_zerp -> amount_sat_is_zero/amount_msat_is_zero. 2024-09-19 12:16:53 +09:30
closed_channel.h lightningd: add last_stable_connection field to db, channel. 2024-01-31 14:47:33 +10:30
closing_control.c lightningd: wire channel closing tx through channel_fail_permanent. 2024-11-25 20:23:21 +10:30
closing_control.h lightningd: make close_txs parameter to resolve_close_command const. 2024-11-25 20:23:21 +10:30
coin_mvts.c lightningd: store our id as a struct pubkey as well as struct node_id. 2024-07-23 09:54:47 +09:30
coin_mvts.h
configs.c config: add the ability for plugins to specify that config values should be concealed. 2024-11-13 08:49:55 +10:30
connect_control.c lightningd: notification for onionmessage_forward_fail. 2024-12-05 17:38:16 +10:30
connect_control.h connectd: reconnect for non-transient connections. 2024-11-25 15:39:13 +10:30
datastore.c lightningd: fix overzealous memleak detection in json_add_datastore. 2024-12-20 15:36:07 +10:30
dual_open_control.c connectd: reconnect for non-transient connections. 2024-11-25 15:39:13 +10:30
dual_open_control.h common: BOLT update: option_anchors_zero_fee_htlc_tx is now simply "option_anchors". 2024-06-19 15:54:24 +09:30
feerate.c lightnind: remove deprecated feerate names. 2024-03-25 15:02:35 +10:30
feerate.h
forwards.c lightningd: listforwards returns 0 for missing received_time. ([#7157]) 2024-10-26 09:51:20 +02:00
forwards.h
gossip_control.c gossipd: don't tell connectd what address to connect to. 2024-11-25 15:39:13 +10:30
gossip_control.h lightningd: ignore gossip messages from channeld, switch to our own. 2024-01-31 14:47:33 +10:30
gossip_generation.c lightningd: store our id as a struct pubkey as well as struct node_id. 2024-07-23 09:54:47 +09:30
gossip_generation.h bitcoin/short_channel_id: pass by copy everywhere. 2024-03-20 13:51:48 +10:30
hsm_control.c splice: Update messages to spec 2024-11-21 14:15:36 +10:30
hsm_control.h
htlc_end.c global: rename blinding to path_key everywhere. 2024-10-16 07:14:32 +10:30
htlc_end.h global: rename blinding to path_key everywhere. 2024-10-16 07:14:32 +10:30
htlc_set.c lightningd: generalize htlc_set. 2024-10-27 13:57:50 +11:00
htlc_set.h lightningd: generalize htlc_set. 2024-10-27 13:57:50 +11:00
invoice.c lightningd: deprecate decodepay. 2024-11-17 14:21:23 +10:30
invoice.h
io_loop_with_timers.c
io_loop_with_timers.h
jsonrpc.c xpay: option to steal easy commands from pay. 2024-11-18 11:03:26 +10:30
jsonrpc.h rpc: Removing description from json_command struct 2024-07-31 14:42:58 +09:30
lightningd.c lightningd: --dev-low-prio-anchor-blocks and test for low-priority anchors. 2024-11-26 14:49:36 +10:30
lightningd.h lightningd: --dev-low-prio-anchor-blocks and test for low-priority anchors. 2024-11-26 14:49:36 +10:30
log_status.c
log_status.h
log.c common: don't send trace messages by default, don't ratelimit at all. 2024-12-16 09:48:51 +10:30
log.h common: don't send trace messages by default, don't ratelimit at all. 2024-12-16 09:48:51 +10:30
Makefile common/bolt12_id: new common routine for creating path secrets. 2024-08-01 12:31:48 +09:30
memdump.c lightningd: fix false positive in leak detection. 2024-08-04 11:47:54 +02:00
memdump.h
notification.c lightningd: notification for onionmessage_forward_fail. 2024-12-05 17:38:16 +10:30
notification.h lightningd: notification for onionmessage_forward_fail. 2024-12-05 17:38:16 +10:30
offer.c bolt12: allow to inject payer_metadata 2024-11-19 22:54:22 +01:00
onchain_control.c lightningd: wire channel closing tx through channel_fail_permanent. 2024-11-25 20:23:21 +10:30
onchain_control.h
onion_message.c lightningd: simplify injectonionmessage API. 2024-12-05 17:38:16 +10:30
onion_message.h
opening_common.c BOLT: update to include 2016 for max_htlc_cltv. 2024-05-09 16:14:23 -05:00
opening_common.h
opening_control.c lightningd: remember when we started closing channel. 2024-11-26 14:49:36 +10:30
opening_control.h common: BOLT update: option_anchors_zero_fee_htlc_tx is now simply "option_anchors". 2024-06-19 15:54:24 +09:30
options.c lightningd: disable seeker autoconnect when --offline 2024-11-28 19:02:35 +10:30
options.h
pay.c lightningd: injectpaymentonion can use scids of unannounced channels. 2024-12-17 15:59:30 +10:30
pay.h lightningd: refactor payment failed. 2024-10-27 13:57:50 +11:00
peer_control.c lightningd: remember when we started closing channel. 2024-11-26 14:49:36 +10:30
peer_control.h lightningd: wire channel closing tx through channel_fail_permanent. 2024-11-25 20:23:21 +10:30
peer_fd.c
peer_fd.h
peer_htlcs.c lightningd: send errors inside blinded paths correctly. 2024-11-20 12:29:27 +01:00
peer_htlcs.h lightningd: new command injectpaymentonion. 2024-10-27 13:57:50 +11:00
ping.c rpc: Removing description from json_command struct 2024-07-31 14:42:58 +09:30
plugin_control.c lightningd: allow builtin plugins to be stopped. 2024-11-18 11:03:26 +10:30
plugin_control.h
plugin_hook.c logging: move two noisy plugin_hook logging entries to TRACE 2024-05-08 21:05:49 -05:00
plugin_hook.h
plugin.c lightningd: don't access after free on plugin crash 2024-11-19 17:51:18 +10:30
plugin.h lightningd: allow plugins to specify cancheck for us to pass check commands through. 2024-05-06 20:51:19 -05:00
routehint.c common/amount: rename amount_sat_zero/amount_msat_zerp -> amount_sat_is_zero/amount_msat_is_zero. 2024-09-19 12:16:53 +09:30
routehint.h
runes.c wire: rename "offer_node_id" to "offer_issuer_id" to match latest BOLT. 2024-08-01 12:31:48 +09:30
runes.h
signmessage.c rpc: Removing description from json_command struct 2024-07-31 14:42:58 +09:30
subd.c common: don't send trace messages by default, don't ratelimit at all. 2024-12-16 09:48:51 +10:30
subd.h lightningd: allow subd_req() to take replycb_data arg. 2024-11-13 14:44:03 +10:30
wait.c rpc: Removing description from json_command struct 2024-07-31 14:42:58 +09:30
wait.h
watch.c logs: Correct an sign mismatch printing the depth change 2024-12-06 15:12:51 +10:30
watch.h lightningd: handle duplicate watches on the same thing correctly. 2024-08-13 07:25:02 -07:00