commit 9d71f037c015246ff5b2a804771cff9d84eb95dd
parent e23c8b6a115158ee54653bff9af664ba9b73b44e
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 29 Oct 2023 20:27:23 +0100
-fix leaks
Diffstat:
6 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/exchangedb/pg_do_age_withdraw.c b/src/exchangedb/pg_do_age_withdraw.c
@@ -82,6 +82,7 @@ TEH_PG_do_age_withdraw (
conflict),
GNUNET_PQ_result_spec_end
};
+ enum GNUNET_DB_QueryStatus qs;
gc = GNUNET_TIME_absolute_to_timestamp (
GNUNET_TIME_absolute_add (now.abs_time,
@@ -98,8 +99,10 @@ TEH_PG_do_age_withdraw (
",conflict"
" FROM exchange_do_age_withdraw"
" ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11);");
- return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
- "call_age_withdraw",
- params,
- rs);
+ qs = GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
+ "call_age_withdraw",
+ params,
+ rs);
+ GNUNET_PQ_cleanup_query_params_closures (params);
+ return qs;
}
diff --git a/src/exchangedb/pg_do_deposit.c b/src/exchangedb/pg_do_deposit.c
@@ -87,6 +87,7 @@ TEH_PG_do_deposit (
ctr_conflict),
GNUNET_PQ_result_spec_end
};
+ enum GNUNET_DB_QueryStatus qs;
for (unsigned int i = 0; i < bd->num_cdis; i++)
{
@@ -109,8 +110,10 @@ TEH_PG_do_deposit (
",out_conflict AS conflicted"
" FROM exchange_do_deposit"
" ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16);");
- return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
- "call_deposit",
- params,
- rs);
+ qs = GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
+ "call_deposit",
+ params,
+ rs);
+ GNUNET_PQ_cleanup_query_params_closures (params);
+ return qs;
}
diff --git a/src/exchangedb/pg_get_link_data.c b/src/exchangedb/pg_get_link_data.c
@@ -69,6 +69,7 @@ free_link_data_list (struct TALER_EXCHANGEDB_LinkList *ldl)
next = ldl->next;
TALER_denom_pub_free (&ldl->denom_pub);
TALER_blinded_denom_sig_free (&ldl->ev_sig);
+ TALER_denom_ewv_free (&ldl->alg_values);
GNUNET_free (ldl);
ldl = next;
}
diff --git a/src/exchangedb/pg_get_refresh_reveal.c b/src/exchangedb/pg_get_refresh_reveal.c
@@ -206,6 +206,7 @@ cleanup:
TALER_blinded_denom_sig_free (&rrc->coin_sig);
TALER_blinded_planchet_free (&rrc->blinded_planchet);
+ TALER_denom_ewv_free (&rrc->exchange_vals);
}
GNUNET_free (grctx.rrcs);
return qs;
diff --git a/src/exchangedb/pg_insert_kyc_attributes.c b/src/exchangedb/pg_insert_kyc_attributes.c
@@ -99,9 +99,9 @@ TEH_PG_insert_kyc_attributes (
"insert_kyc_attributes",
params,
rs);
+ GNUNET_PQ_cleanup_query_params_closures (params);
GNUNET_free (kyc_completed_notify_s);
GNUNET_PQ_event_do_poll (pg->conn);
-
if (qs < 0)
return qs;
if (! ok)
diff --git a/src/exchangedb/pg_reserves_in_insert.c b/src/exchangedb/pg_reserves_in_insert.c
@@ -246,6 +246,7 @@ TEH_PG_reserves_in_insert (
params,
&helper_cb,
&ctx);
+ GNUNET_PQ_cleanup_query_params_closures (params);
if ( (qs < 0) ||
(GNUNET_OK != ctx.status) )
{