mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 10:46:58 +01:00
lightningd: don't use notleak in chaintopology.c
We can add the htable to the memleak detection, and we already do this for the watches. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
fc54c19716
commit
4757c965e0
2 changed files with 5 additions and 5 deletions
|
@ -8,7 +8,6 @@
|
|||
#include <common/htlc_tx.h>
|
||||
#include <common/json_command.h>
|
||||
#include <common/json_param.h>
|
||||
#include <common/memleak.h>
|
||||
#include <common/timeout.h>
|
||||
#include <common/type_to_string.h>
|
||||
#include <db/exec.h>
|
||||
|
@ -224,7 +223,7 @@ static void broadcast_done(struct bitcoind *bitcoind,
|
|||
} else {
|
||||
/* For continual rebroadcasting, until channel freed. */
|
||||
tal_steal(otx->channel, otx);
|
||||
outgoing_tx_map_add(bitcoind->ld->topology->outgoing_txs, notleak(otx));
|
||||
outgoing_tx_map_add(bitcoind->ld->topology->outgoing_txs, otx);
|
||||
tal_add_destructor2(otx, destroy_outgoing_tx, bitcoind->ld->topology);
|
||||
}
|
||||
}
|
||||
|
@ -324,9 +323,9 @@ static void watch_for_utxo_reconfirmation(struct chain_topology *topo,
|
|||
if (find_txwatch(topo, &unconfirmed[i]->outpoint.txid, NULL))
|
||||
continue;
|
||||
|
||||
notleak(watch_txid(topo, topo, NULL,
|
||||
&unconfirmed[i]->outpoint.txid,
|
||||
closeinfo_txid_confirmed));
|
||||
watch_txid(topo, topo, NULL,
|
||||
&unconfirmed[i]->outpoint.txid,
|
||||
closeinfo_txid_confirmed);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -152,6 +152,7 @@ static void finish_report(const struct leak_detect *leaks)
|
|||
/* First delete known false positives. */
|
||||
memleak_scan_htable(memtable, &ld->topology->txwatches->raw);
|
||||
memleak_scan_htable(memtable, &ld->topology->txowatches->raw);
|
||||
memleak_scan_htable(memtable, &ld->topology->outgoing_txs->raw);
|
||||
memleak_scan_htable(memtable, &ld->htlcs_in->raw);
|
||||
memleak_scan_htable(memtable, &ld->htlcs_out->raw);
|
||||
memleak_scan_htable(memtable, &ld->htlc_sets->raw);
|
||||
|
|
Loading…
Add table
Reference in a new issue