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>
This commit is contained in:
@@ -506,7 +506,7 @@ const char *refine_flows(const tal_t *ctx, struct route_query *rq,
|
||||
/* htlc_min is not met for this flow */
|
||||
tal_arr_remove(&flows_index, i);
|
||||
error_message = remove_htlc_min_violations(
|
||||
working_ctx, rq, (*flows)[k]);
|
||||
ctx, rq, (*flows)[k]);
|
||||
if (error_message)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user