summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_responses.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-06-11 16:16:49 +0200
committerChristian Grothoff <christian@grothoff.org>2016-06-11 16:16:49 +0200
commitce5587b42770f6eb91ec2ca31342e267ae074605 (patch)
treebbaf0acdf78abee95b0c0581a0b0ee67c558c10f /src/exchange/taler-exchange-httpd_responses.c
parent7dc075ae283f76669065c7357d6c8e4d39ae811e (diff)
downloadexchange-ce5587b42770f6eb91ec2ca31342e267ae074605.tar.gz
exchange-ce5587b42770f6eb91ec2ca31342e267ae074605.tar.bz2
exchange-ce5587b42770f6eb91ec2ca31342e267ae074605.zip
fix memory leaks: json_array_append increments RC
Diffstat (limited to 'src/exchange/taler-exchange-httpd_responses.c')
-rw-r--r--src/exchange/taler-exchange-httpd_responses.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c
index 1b3418dfb..0c296d942 100644
--- a/src/exchange/taler-exchange-httpd_responses.c
+++ b/src/exchange/taler-exchange-httpd_responses.c
@@ -1278,13 +1278,13 @@ TMH_RESPONSE_reply_track_transfer_details (struct MHD_Connection *connection,
&dd,
sizeof (struct TALER_WireDepositDetailP));
GNUNET_assert (0 ==
- json_array_append (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,
- "coin_pub", GNUNET_JSON_from_data_auto (&wdd_pos->coin_pub),
- "deposit_value", TALER_JSON_from_amount (&wdd_pos->deposit_value),
- "deposit_fee", TALER_JSON_from_amount (&wdd_pos->deposit_fee))));
+ 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,
+ "coin_pub", GNUNET_JSON_from_data_auto (&wdd_pos->coin_pub),
+ "deposit_value", TALER_JSON_from_amount (&wdd_pos->deposit_value),
+ "deposit_fee", TALER_JSON_from_amount (&wdd_pos->deposit_fee))));
}
wdp.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE_DEPOSIT);
wdp.purpose.size = htonl (sizeof (struct TALER_WireDepositDataPS));