mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 18:57:06 +01:00
wallet: don't leak string on update.
We actually don't need tal_fmt() here at all, anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
5a319c781c
commit
bbbbb60863
1 changed files with 21 additions and 21 deletions
|
@ -622,7 +622,7 @@ void wallet_channel_save(struct wallet *w, struct wallet_channel *chan){
|
||||||
wallet_channel_config_save(w, &p->our_config);
|
wallet_channel_config_save(w, &p->our_config);
|
||||||
|
|
||||||
/* Now do the real update */
|
/* Now do the real update */
|
||||||
stmt = db_prepare(w->db, tal_fmt(w, "UPDATE channels SET"
|
stmt = db_prepare(w->db, "UPDATE channels SET"
|
||||||
" shachain_remote_id=?,"
|
" shachain_remote_id=?,"
|
||||||
" short_channel_id=?,"
|
" short_channel_id=?,"
|
||||||
" state=?,"
|
" state=?,"
|
||||||
|
@ -642,7 +642,7 @@ void wallet_channel_save(struct wallet *w, struct wallet_channel *chan){
|
||||||
" shutdown_keyidx_local=?,"
|
" shutdown_keyidx_local=?,"
|
||||||
" channel_config_local=?,"
|
" channel_config_local=?,"
|
||||||
" last_tx=?, last_sig=?"
|
" last_tx=?, last_sig=?"
|
||||||
" WHERE id=?"));
|
" WHERE id=?");
|
||||||
sqlite3_bind_int64(stmt, 1, p->their_shachain.id);
|
sqlite3_bind_int64(stmt, 1, p->their_shachain.id);
|
||||||
if (p->scid)
|
if (p->scid)
|
||||||
sqlite3_bind_short_channel_id(stmt, 2, p->scid);
|
sqlite3_bind_short_channel_id(stmt, 2, p->scid);
|
||||||
|
|
Loading…
Add table
Reference in a new issue