aboutsummaryrefslogtreecommitdiff
path: root/src/mintdb/perf_taler_mintdb_interpreter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mintdb/perf_taler_mintdb_interpreter.c')
-rw-r--r--src/mintdb/perf_taler_mintdb_interpreter.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mintdb/perf_taler_mintdb_interpreter.c b/src/mintdb/perf_taler_mintdb_interpreter.c
index 0585d16a7..4865e9c2f 100644
--- a/src/mintdb/perf_taler_mintdb_interpreter.c
+++ b/src/mintdb/perf_taler_mintdb_interpreter.c
@@ -62,22 +62,34 @@ data_free (struct PERF_TALER_MINTDB_Data *data)
switch (data->type)
{
case PERF_TALER_MINTDB_DEPOSIT:
+ if (NULL == data->data.deposit)
+ return;
PERF_TALER_MINTDB_deposit_free (data->data.deposit);
+ GNUNET_free (data->data.deposit);
data->data.deposit = NULL;
return;
case PERF_TALER_MINTDB_BLINDCOIN:
+ if (NULL == data->data.blindcoin)
+ return;
PERF_TALER_MINTDB_collectable_blindcoin_free (data->data.blindcoin);
+ GNUNET_free (data->data.blindcoin);
data->data.blindcoin = NULL;
return;
case PERF_TALER_MINTDB_RESERVE:
+ if (NULL == data->data.reserve)
+ return;
PERF_TALER_MINTDB_reserve_free (data->data.reserve);
+ GNUNET_free (data->data.reserve);
data->data.reserve = NULL;
return;
case PERF_TALER_MINTDB_DENOMINATION_INFO:
+ if (NULL == data->data.dki)
+ return;
PERF_TALER_MINTDB_denomination_free (data->data.dki);
+ GNUNET_free (data->data.dki);
data->data.dki = NULL;
return;