fix memory leaks: json_array_append increments RC
This commit is contained in:
parent
7dc075ae28
commit
ce5587b427
@ -1318,7 +1318,7 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange,
|
||||
GNUNET_CRYPTO_ecdhe_key_get_public (&mc->transfer_priv[j].ecdhe_priv,
|
||||
&transfer_pub.ecdhe_pub);
|
||||
GNUNET_assert (0 ==
|
||||
json_array_append (transfer_pubs,
|
||||
json_array_append_new (transfer_pubs,
|
||||
GNUNET_JSON_from_data_auto (&transfer_pub)));
|
||||
}
|
||||
|
||||
@ -1337,7 +1337,7 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange,
|
||||
&trans_sec,
|
||||
&els));
|
||||
GNUNET_assert (0 ==
|
||||
json_array_append (secret_encs,
|
||||
json_array_append_new (secret_encs,
|
||||
GNUNET_JSON_from_data_auto (&els)));
|
||||
}
|
||||
|
||||
@ -1345,7 +1345,7 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange,
|
||||
for (i=0;i<md->num_fresh_coins;i++)
|
||||
{
|
||||
GNUNET_assert (0 ==
|
||||
json_array_append (new_denoms,
|
||||
json_array_append_new (new_denoms,
|
||||
GNUNET_JSON_from_rsa_public_key
|
||||
(md->fresh_pks[i].rsa_public_key)));
|
||||
}
|
||||
@ -1366,11 +1366,11 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange,
|
||||
&md->link_secrets[j],
|
||||
&rle);
|
||||
GNUNET_assert (0 ==
|
||||
json_array_append (tmp,
|
||||
json_array_append_new (tmp,
|
||||
GNUNET_JSON_from_data_auto (&rle)));
|
||||
}
|
||||
GNUNET_assert (0 ==
|
||||
json_array_append (link_encs,
|
||||
json_array_append_new (link_encs,
|
||||
tmp));
|
||||
}
|
||||
|
||||
@ -1410,13 +1410,13 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange,
|
||||
return NULL;
|
||||
}
|
||||
GNUNET_assert (0 ==
|
||||
json_array_append (tmp,
|
||||
json_array_append_new (tmp,
|
||||
GNUNET_JSON_from_data (coin_ev,
|
||||
coin_ev_size)));
|
||||
GNUNET_free (coin_ev);
|
||||
}
|
||||
GNUNET_assert (0 ==
|
||||
json_array_append (coin_evs,
|
||||
json_array_append_new (coin_evs,
|
||||
tmp));
|
||||
}
|
||||
|
||||
@ -1796,7 +1796,7 @@ TALER_EXCHANGE_refresh_reveal (struct TALER_EXCHANGE_Handle *exchange,
|
||||
continue;
|
||||
}
|
||||
GNUNET_assert (0 ==
|
||||
json_array_append (transfer_privs,
|
||||
json_array_append_new (transfer_privs,
|
||||
GNUNET_JSON_from_data_auto (&md->melted_coin.transfer_priv[j])));
|
||||
}
|
||||
|
||||
|
@ -1278,7 +1278,7 @@ TMH_RESPONSE_reply_track_transfer_details (struct MHD_Connection *connection,
|
||||
&dd,
|
||||
sizeof (struct TALER_WireDepositDetailP));
|
||||
GNUNET_assert (0 ==
|
||||
json_array_append (deposits,
|
||||
json_array_append_new (deposits,
|
||||
json_pack ("{s:o, s:I, s:o, s:o, s:o}",
|
||||
"H_contract", GNUNET_JSON_from_data_auto (&wdd_pos->h_contract),
|
||||
"transaction_id", (json_int_t) wdd_pos->transaction_id,
|
||||
|
Loading…
Reference in New Issue
Block a user