aboutsummaryrefslogtreecommitdiff
path: root/src/mintdb/plugin_mintdb_common.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-09-22 10:16:01 +0200
committerChristian Grothoff <christian@grothoff.org>2015-09-22 10:16:01 +0200
commit8aebcf283a4aecb1d058db8b4f021439e45d3685 (patch)
tree683bb7487e7d07084bdbb84c002719e91a72a770 /src/mintdb/plugin_mintdb_common.c
parent3c8c127e0e629f4075287ad33e54d5c51b24eddb (diff)
more leaks
Diffstat (limited to 'src/mintdb/plugin_mintdb_common.c')
-rw-r--r--src/mintdb/plugin_mintdb_common.c33
1 files changed, 24 insertions, 9 deletions
diff --git a/src/mintdb/plugin_mintdb_common.c b/src/mintdb/plugin_mintdb_common.c
index 99ff92ae3..bbe104f6c 100644
--- a/src/mintdb/plugin_mintdb_common.c
+++ b/src/mintdb/plugin_mintdb_common.c
@@ -127,19 +127,34 @@ common_free_melt_commitment (void *cls,
unsigned int i;
unsigned int k;
- GNUNET_free (mc->melts);
- for (i=0;i<mc->num_newcoins;i++)
- GNUNET_CRYPTO_rsa_public_key_free (mc->denom_pubs[i].rsa_public_key);
- GNUNET_free (mc->denom_pubs);
- for (k=0;k<TALER_CNC_KAPPA;k++)
+ if (NULL != mc->melts)
+ {
+ for (i=0;i<mc->num_oldcoins;i++)
+ {
+ GNUNET_CRYPTO_rsa_signature_free (mc->melts[i].coin.denom_sig.rsa_signature);
+ GNUNET_CRYPTO_rsa_public_key_free (mc->melts[i].coin.denom_pub.rsa_public_key);
+ }
+ GNUNET_free (mc->melts);
+ }
+ if (NULL != mc->denom_pubs)
{
for (i=0;i<mc->num_newcoins;i++)
+ if (NULL != mc->denom_pubs[i].rsa_public_key)
+ GNUNET_CRYPTO_rsa_public_key_free (mc->denom_pubs[i].rsa_public_key);
+ GNUNET_free (mc->denom_pubs);
+ }
+ for (k=0;k<TALER_CNC_KAPPA;k++)
+ {
+ if (NULL != mc->commit_coins[k])
{
- GNUNET_free (mc->commit_coins[k][i].refresh_link);
- GNUNET_free (mc->commit_coins[k][i].coin_ev);
+ for (i=0;i<mc->num_newcoins;i++)
+ {
+ GNUNET_free (mc->commit_coins[k][i].refresh_link);
+ GNUNET_free (mc->commit_coins[k][i].coin_ev);
+ }
+ GNUNET_free (mc->commit_coins[k]);
}
- GNUNET_free (mc->commit_coins[k]);
- GNUNET_free (mc->commit_links[k]);
+ GNUNET_free_non_null (mc->commit_links[k]);
}
GNUNET_free (mc);
}