@@ -1618,24 +1618,21 @@ linear_routes(const tal_t *ctx, struct route_query *rq,
16181618 rq_log (rq , rq , LOG_BROKEN ,
16191619 "%s: check_htlc_min_limits failed" , __func__ );
16201620 * flows = tal_free (* flows );
1621- goto fail ;
1621+ return error_message ;
16221622 }
16231623 if (!check_htlc_max_limits (rq , * flows )) {
1624- error_message =
1625- rq_log (rq , rq , LOG_BROKEN ,
1626- "%s: check_htlc_max_limits failed" , __func__ );
16271624 * flows = tal_free (* flows );
1628- goto fail ;
1625+ return rq_log (rq , rq , LOG_BROKEN ,
1626+ "%s: check_htlc_max_limits failed" , __func__ );
16291627 }
16301628 if (tal_count (* flows ) > rq -> maxparts ) {
1631- error_message = rq_log (
1632- rq , rq , LOG_BROKEN ,
1633- "%s: the number of flows (%zu) exceeds the limit set "
1634- "on payment parts (%" PRIu32
1635- "), please submit a bug report" ,
1636- __func__ , tal_count (* flows ), rq -> maxparts );
1629+ size_t num_flows = tal_count (* flows );
16371630 * flows = tal_free (* flows );
1638- goto fail ;
1631+ return rq_log (rq , rq , LOG_BROKEN ,
1632+ "%s: the number of flows (%zu) exceeds the limit set "
1633+ "on payment parts (%" PRIu32
1634+ "), please submit a bug report" ,
1635+ __func__ , num_flows , rq -> maxparts );
16391636 }
16401637
16411638 return NULL ;
0 commit comments