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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-04-26 17:07:34 +09:30
committed by Christian Decker
parent 83e847575c
commit aa71a822b3

View File

@@ -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;
}