more leaks
This commit is contained in:
parent
3c8c127e0e
commit
8aebcf283a
@ -1265,6 +1265,11 @@ TMH_DB_execute_refresh_reveal (struct MHD_Connection *connection,
|
|||||||
&melts[j]))
|
&melts[j]))
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
|
for (i=0;i<j;i++)
|
||||||
|
{
|
||||||
|
GNUNET_CRYPTO_rsa_signature_free (melts[i].coin.denom_sig.rsa_signature);
|
||||||
|
GNUNET_CRYPTO_rsa_public_key_free (melts[i].coin.denom_pub.rsa_public_key);
|
||||||
|
}
|
||||||
GNUNET_free (melts);
|
GNUNET_free (melts);
|
||||||
return TMH_RESPONSE_reply_internal_db_error (connection);
|
return TMH_RESPONSE_reply_internal_db_error (connection);
|
||||||
}
|
}
|
||||||
@ -1280,6 +1285,11 @@ TMH_DB_execute_refresh_reveal (struct MHD_Connection *connection,
|
|||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
GNUNET_free (denom_pubs);
|
GNUNET_free (denom_pubs);
|
||||||
|
for (i=0;i<refresh_session.num_oldcoins;i++)
|
||||||
|
{
|
||||||
|
GNUNET_CRYPTO_rsa_signature_free (melts[i].coin.denom_sig.rsa_signature);
|
||||||
|
GNUNET_CRYPTO_rsa_public_key_free (melts[i].coin.denom_pub.rsa_public_key);
|
||||||
|
}
|
||||||
GNUNET_free (melts);
|
GNUNET_free (melts);
|
||||||
return (MHD_YES == TMH_RESPONSE_reply_internal_db_error (connection))
|
return (MHD_YES == TMH_RESPONSE_reply_internal_db_error (connection))
|
||||||
? GNUNET_NO : GNUNET_SYSERR;
|
? GNUNET_NO : GNUNET_SYSERR;
|
||||||
@ -1305,10 +1315,20 @@ TMH_DB_execute_refresh_reveal (struct MHD_Connection *connection,
|
|||||||
for (j=0;j<refresh_session.num_newcoins;j++)
|
for (j=0;j<refresh_session.num_newcoins;j++)
|
||||||
GNUNET_CRYPTO_rsa_public_key_free (denom_pubs[j].rsa_public_key);
|
GNUNET_CRYPTO_rsa_public_key_free (denom_pubs[j].rsa_public_key);
|
||||||
GNUNET_free (denom_pubs);
|
GNUNET_free (denom_pubs);
|
||||||
|
for (i=0;i<refresh_session.num_oldcoins;i++)
|
||||||
|
{
|
||||||
|
GNUNET_CRYPTO_rsa_signature_free (melts[i].coin.denom_sig.rsa_signature);
|
||||||
|
GNUNET_CRYPTO_rsa_public_key_free (melts[i].coin.denom_pub.rsa_public_key);
|
||||||
|
}
|
||||||
GNUNET_free (melts);
|
GNUNET_free (melts);
|
||||||
return (GNUNET_NO == res) ? MHD_YES : MHD_NO;
|
return (GNUNET_NO == res) ? MHD_YES : MHD_NO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (i=0;i<refresh_session.num_oldcoins;i++)
|
||||||
|
{
|
||||||
|
GNUNET_CRYPTO_rsa_signature_free (melts[i].coin.denom_sig.rsa_signature);
|
||||||
|
GNUNET_CRYPTO_rsa_public_key_free (melts[i].coin.denom_pub.rsa_public_key);
|
||||||
|
}
|
||||||
GNUNET_free (melts);
|
GNUNET_free (melts);
|
||||||
|
|
||||||
/* Client request OK, start transaction */
|
/* Client request OK, start transaction */
|
||||||
|
@ -77,8 +77,10 @@ TALER_MINTDB_plugin_unload (struct TALER_MINTDB_Plugin *plugin)
|
|||||||
if (NULL == plugin)
|
if (NULL == plugin)
|
||||||
return;
|
return;
|
||||||
lib_name = plugin->library_name;
|
lib_name = plugin->library_name;
|
||||||
|
#if SKIP
|
||||||
GNUNET_assert (NULL == GNUNET_PLUGIN_unload (lib_name,
|
GNUNET_assert (NULL == GNUNET_PLUGIN_unload (lib_name,
|
||||||
plugin));
|
plugin));
|
||||||
|
#endif
|
||||||
GNUNET_free (lib_name);
|
GNUNET_free (lib_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,19 +127,34 @@ common_free_melt_commitment (void *cls,
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
unsigned int k;
|
unsigned int k;
|
||||||
|
|
||||||
GNUNET_free (mc->melts);
|
if (NULL != mc->melts)
|
||||||
for (i=0;i<mc->num_newcoins;i++)
|
{
|
||||||
GNUNET_CRYPTO_rsa_public_key_free (mc->denom_pubs[i].rsa_public_key);
|
for (i=0;i<mc->num_oldcoins;i++)
|
||||||
GNUNET_free (mc->denom_pubs);
|
{
|
||||||
for (k=0;k<TALER_CNC_KAPPA;k++)
|
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++)
|
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);
|
for (i=0;i<mc->num_newcoins;i++)
|
||||||
GNUNET_free (mc->commit_coins[k][i].coin_ev);
|
{
|
||||||
|
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_non_null (mc->commit_links[k]);
|
||||||
GNUNET_free (mc->commit_links[k]);
|
|
||||||
}
|
}
|
||||||
GNUNET_free (mc);
|
GNUNET_free (mc);
|
||||||
}
|
}
|
||||||
|
@ -2273,12 +2273,15 @@ get_known_coin (void *cls,
|
|||||||
return GNUNET_YES;
|
return GNUNET_YES;
|
||||||
{
|
{
|
||||||
struct TALER_PQ_ResultSpec rs[] = {
|
struct TALER_PQ_ResultSpec rs[] = {
|
||||||
TALER_PQ_result_spec_rsa_public_key ("denom_pub", &coin_info->denom_pub.rsa_public_key),
|
TALER_PQ_result_spec_rsa_public_key ("denom_pub",
|
||||||
TALER_PQ_result_spec_rsa_signature ("denom_sig", &coin_info->denom_sig.rsa_signature),
|
&coin_info->denom_pub.rsa_public_key),
|
||||||
|
TALER_PQ_result_spec_rsa_signature ("denom_sig",
|
||||||
|
&coin_info->denom_sig.rsa_signature),
|
||||||
TALER_PQ_result_spec_end
|
TALER_PQ_result_spec_end
|
||||||
};
|
};
|
||||||
|
|
||||||
if (GNUNET_OK != TALER_PQ_extract_result (result, rs, 0))
|
if (GNUNET_OK !=
|
||||||
|
TALER_PQ_extract_result (result, rs, 0))
|
||||||
{
|
{
|
||||||
PQclear (result);
|
PQclear (result);
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
@ -2428,7 +2431,11 @@ postgres_get_refresh_melt (void *cls,
|
|||||||
&coin))
|
&coin))
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
if (NULL == melt)
|
if (NULL == melt)
|
||||||
|
{
|
||||||
|
GNUNET_CRYPTO_rsa_signature_free (coin.denom_sig.rsa_signature);
|
||||||
|
GNUNET_CRYPTO_rsa_public_key_free (coin.denom_pub.rsa_public_key);
|
||||||
return GNUNET_OK;
|
return GNUNET_OK;
|
||||||
|
}
|
||||||
melt->coin = coin;
|
melt->coin = coin;
|
||||||
melt->coin_sig = coin_sig;
|
melt->coin_sig = coin_sig;
|
||||||
melt->session_hash = *session_hash;
|
melt->session_hash = *session_hash;
|
||||||
@ -2974,28 +2981,7 @@ postgres_get_melt_commitment (void *cls,
|
|||||||
return mc;
|
return mc;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
GNUNET_free_non_null (mc->melts);
|
common_free_melt_commitment (cls, mc);
|
||||||
if (NULL != mc->denom_pubs)
|
|
||||||
{
|
|
||||||
for (i=0;i<(unsigned int) 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 (cnc_index=0;cnc_index<TALER_CNC_KAPPA;cnc_index++)
|
|
||||||
{
|
|
||||||
if (NULL != mc->commit_coins[cnc_index])
|
|
||||||
{
|
|
||||||
for (i=0;i<(unsigned int) mc->num_newcoins;i++)
|
|
||||||
{
|
|
||||||
GNUNET_free_non_null (mc->commit_coins[cnc_index][i].refresh_link);
|
|
||||||
GNUNET_free_non_null (mc->commit_coins[cnc_index][i].coin_ev);
|
|
||||||
}
|
|
||||||
GNUNET_free (mc->commit_coins[cnc_index]);
|
|
||||||
}
|
|
||||||
GNUNET_free_non_null (mc->commit_links[cnc_index]);
|
|
||||||
}
|
|
||||||
GNUNET_free (mc);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user