File tree 1 file changed +5
-2
lines changed 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -458,7 +458,9 @@ void peer_sent_nongossip(struct lightningd *ld,
458
458
}
459
459
460
460
/* Weird request. */
461
- error = towire_errorfmt (ld , channel_id ,
461
+ /* Allocate off in_msg, which should get freed by the
462
+ * caller. */
463
+ error = towire_errorfmt (in_msg , channel_id ,
462
464
"Unexpected message %i for peer" ,
463
465
fromwire_peektype (in_msg ));
464
466
@@ -469,7 +471,8 @@ void peer_sent_nongossip(struct lightningd *ld,
469
471
subd_send_msg (ld -> gossip , take (msg ));
470
472
subd_send_fd (ld -> gossip , peer_fd );
471
473
subd_send_fd (ld -> gossip , gossip_fd );
472
- tal_free (error );
474
+ /* Either error is allocated off in_msg, or error is owned by
475
+ * the channel. Either way we have no need to free error here. */
473
476
}
474
477
475
478
static enum watch_result funding_announce_cb (struct channel * channel ,
You can’t perform that action at this time.
0 commit comments