diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-19 11:12:56 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-19 11:12:56 +0100 |
commit | b0ba819cf41a3a13a84516d4fc6574277ba2ec96 (patch) | |
tree | 2d978f915a9a36359e528d4d400f457e0b1ac054 /src | |
parent | ea1f2a1cd5fc6c9a0b4109ebf0c72a066a5dfa2b (diff) |
check return value from taler_array_append_new()
Diffstat (limited to 'src')
-rw-r--r-- | src/exchange/taler-exchange-httpd_wire.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/exchange/taler-exchange-httpd_wire.c b/src/exchange/taler-exchange-httpd_wire.c index 26cbb1870..2109395cd 100644 --- a/src/exchange/taler-exchange-httpd_wire.c +++ b/src/exchange/taler-exchange-httpd_wire.c @@ -54,12 +54,18 @@ fees_to_json (struct TALER_EXCHANGEDB_AggregateFees *af) json_decref (a); return NULL; } - json_array_append_new (a, - json_pack ("{s:o, s:o, s:o, s:o}", - "wire_fee", TALER_JSON_from_amount (&af->wire_fee), - "start_date", GNUNET_JSON_from_time_abs (af->start_date), - "end_date", GNUNET_JSON_from_time_abs (af->end_date), - "sig", GNUNET_JSON_from_data_auto (&af->master_sig))); + if (0 != + json_array_append_new (a, + json_pack ("{s:o, s:o, s:o, s:o}", + "wire_fee", TALER_JSON_from_amount (&af->wire_fee), + "start_date", GNUNET_JSON_from_time_abs (af->start_date), + "end_date", GNUNET_JSON_from_time_abs (af->end_date), + "sig", GNUNET_JSON_from_data_auto (&af->master_sig)))) + { + GNUNET_break (0); + json_decref (a); + return NULL; + } af = af->next; } return a; |