Skip to content

Commit e120202

Browse files
committed
askrene: fix use-after-free if remove_htlc_min_violations fails.
It can only fail on overflow, but if it did, the fail path frees working_ctx and returns "error_message". Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent b5b4dbf commit e120202

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/askrene/refine.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ const char *refine_flows(const tal_t *ctx, struct route_query *rq,
506506
/* htlc_min is not met for this flow */
507507
tal_arr_remove(&flows_index, i);
508508
error_message = remove_htlc_min_violations(
509-
working_ctx, rq, (*flows)[k]);
509+
ctx, rq, (*flows)[k]);
510510
if (error_message)
511511
goto fail;
512512
}

0 commit comments

Comments
 (0)