commit b1f40d48e4c0f4f4fbfa875c291d3c57c9c4e04c
parent 837966947ee91694d3364b8fbadc05b93619314b
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 26 Oct 2025 02:14:57 +0100
fix leak (#10505)
Diffstat:
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/donaudb/pg_get_charities.c b/src/donaudb/pg_get_charities.c
@@ -92,6 +92,7 @@ get_charities_cb (void *cls,
&receipts_to_date),
GNUNET_PQ_result_spec_end
};
+ enum GNUNET_GenericReturnValue ret;
if (GNUNET_OK !=
GNUNET_PQ_extract_result (result,
@@ -108,14 +109,15 @@ get_charities_cb (void *cls,
TALER_amount_set_zero (max_per_year.currency,
&receipts_to_date));
ctx->qs = i + 1;
- if (GNUNET_OK !=
- ctx->cb (ctx->cb_cls,
- charity_id,
- &charity_pub,
- charity_name,
- &max_per_year,
- current_year,
- &receipts_to_date))
+ ret = ctx->cb (ctx->cb_cls,
+ charity_id,
+ &charity_pub,
+ charity_name,
+ &max_per_year,
+ current_year,
+ &receipts_to_date);
+ GNUNET_PQ_cleanup_result (rs);
+ if (GNUNET_OK != ret)
break;
}
}