mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 20:09:18 +01:00
lightningd: trivial cleanup: use tmpctx.
No need to explicitly free this var, we can use tmpctx. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
901342b50d
commit
86c29b6acc
1 changed files with 1 additions and 3 deletions
|
@ -1014,7 +1014,7 @@ void channel_internal_error(struct channel *channel, const char *fmt, ...)
|
|||
char *why;
|
||||
|
||||
va_start(ap, fmt);
|
||||
why = tal_vfmt(channel, fmt, ap);
|
||||
why = tal_vfmt(tmpctx, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
log_broken(channel->log, "Internal error %s: %s",
|
||||
|
@ -1026,7 +1026,6 @@ void channel_internal_error(struct channel *channel, const char *fmt, ...)
|
|||
if (channel_state_uncommitted(channel->state)) {
|
||||
channel_set_owner(channel, NULL);
|
||||
delete_channel(channel);
|
||||
tal_free(why);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1036,7 +1035,6 @@ void channel_internal_error(struct channel *channel, const char *fmt, ...)
|
|||
REASON_LOCAL, "Internal error: %s", why);
|
||||
else
|
||||
channel_fail_permanent(channel, REASON_LOCAL, "Internal error");
|
||||
tal_free(why);
|
||||
}
|
||||
|
||||
void channel_set_billboard(struct channel *channel, bool perm, const char *str)
|
||||
|
|
Loading…
Add table
Reference in a new issue