From 480e32a236df27c642923f8f9abcfdd73a732a2f Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sat, 28 Jul 2018 15:30:21 +0930 Subject: [PATCH] channeld: don't resize tal_fmt() output. This fixed a previous bug, but now tal/str makes this guaranteee. Signed-off-by: Rusty Russell --- channeld/channel.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/channeld/channel.c b/channeld/channel.c index fa106b14c..6cb87be51 100644 --- a/channeld/channel.c +++ b/channeld/channel.c @@ -2157,8 +2157,6 @@ static void handle_offer_htlc(struct peer *peer, const u8 *inmsg) abort(); failed: - /* Note: tal_fmt doesn't set tal_len() to exact length, so fix here. */ - tal_resize(&failmsg, strlen(failmsg)+1); msg = towire_channel_offer_htlc_reply(NULL, 0, failcode, (u8*)failmsg); wire_sync_write(MASTER_FD, take(msg)); }