From 30ec739c15fe72b7142f53918dd0d8a4695aaa4b Mon Sep 17 00:00:00 2001 From: Yash Bhutwala Date: Sun, 6 Oct 2019 18:25:23 -0400 Subject: [PATCH] check for return code in the else block --- bitcoin/tx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bitcoin/tx.c b/bitcoin/tx.c index 73a50ed26..2ea1b16f9 100644 --- a/bitcoin/tx.c +++ b/bitcoin/tx.c @@ -42,6 +42,7 @@ int bitcoin_tx_add_output(struct bitcoin_tx *tx, const u8 *script, } else { ret = wally_tx_output_init_alloc(satoshis, script, tal_bytelen(script), &output); + assert(ret == WALLY_OK); } ret = wally_tx_add_output(tx->wtx, output); assert(ret == WALLY_OK);