From aa71a822b3665dc68b93a6d72ea69dbfebffecc5 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 26 Apr 2018 17:07:34 +0930 Subject: [PATCH] wallet: free sql statement in wallet_onchaind_channels. This is the cause of 'sqlite3_close: unable to close due to unfinalized statements or unfinished backups' with the --daemon option. Fixes: #1420 Signed-off-by: Rusty Russell --- wallet/wallet.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wallet/wallet.c b/wallet/wallet.c index 14a0a6bd8..f6b958a72 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -2264,6 +2264,7 @@ u32 *wallet_onchaind_channels(struct wallet *w, tal_resize(&channel_ids, count); channel_ids[count-1] = sqlite3_column_int64(stmt, 0); } + sqlite3_finalize(stmt); return channel_ids; }