Browse Source

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>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
bbbbb60863
  1. 4
      wallet/wallet.c

4
wallet/wallet.c

@ -622,7 +622,7 @@ void wallet_channel_save(struct wallet *w, struct wallet_channel *chan){
wallet_channel_config_save(w, &p->our_config);
/* 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=?,"
" short_channel_id=?,"
" state=?,"
@ -642,7 +642,7 @@ void wallet_channel_save(struct wallet *w, struct wallet_channel *chan){
" shutdown_keyidx_local=?,"
" channel_config_local=?,"
" last_tx=?, last_sig=?"
" WHERE id=?"));
" WHERE id=?");
sqlite3_bind_int64(stmt, 1, p->their_shachain.id);
if (p->scid)
sqlite3_bind_short_channel_id(stmt, 2, p->scid);

Loading…
Cancel
Save