MCPcopy Create free account
hub / github.com/ElementsProject/lightning / tal_free_if_taken

Function tal_free_if_taken

common/utils.h:101–105  ·  view source on GitHub ↗

Helper to free an ptr if it's taken() */

Source from the content-addressed store, hash-verified

99
100/* Helper to free an ptr if it's taken() */
101static inline void tal_free_if_taken(const tal_t *p)
102{
103 if (taken(p))
104 tal_free(p);
105}
106
107/**
108 * Append one tal array to another (TAKES)

Callers 15

process_batch_elementsFunction · 0.85
queue_peer_msgFunction · 0.85
enqueue_cupdateFunction · 0.85
enqueue_nannounceFunction · 0.85
send_coin_mvtFunction · 0.85
wire_sync_writeFunction · 0.85
bitcoin_scriptsig_redeemFunction · 0.85
find_chain_eventsFunction · 0.85
insert_channel_mvtFunction · 0.85
wallet_save_chain_mvtFunction · 0.85
invoices_createFunction · 0.85

Calls 2

takenFunction · 0.85
tal_freeFunction · 0.85

Tested by 3

wire_sync_writeFunction · 0.68
json_out_objFunction · 0.68
jsonrpc_request_syncFunction · 0.68