summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-aggregator.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-06-11 18:22:33 +0200
committerChristian Grothoff <christian@grothoff.org>2016-06-11 18:22:33 +0200
commit766fb6e2821dc84ccfe290e8906f12001e34043b (patch)
tree6db1e23ca9402076b9390a662b79f101ec58f750 /src/exchange/taler-exchange-aggregator.c
parentf4b013b3d467f93482a00b208acf3a2874362fe7 (diff)
downloadexchange-766fb6e2821dc84ccfe290e8906f12001e34043b.tar.gz
exchange-766fb6e2821dc84ccfe290e8906f12001e34043b.tar.bz2
exchange-766fb6e2821dc84ccfe290e8906f12001e34043b.zip
fixing more leaks
Diffstat (limited to 'src/exchange/taler-exchange-aggregator.c')
-rw-r--r--src/exchange/taler-exchange-aggregator.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index e3262962c..d7b216e5f 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -432,12 +432,11 @@ deposit_cb (void *cls,
return GNUNET_SYSERR;
}
au->row_id = row_id;
- au->wire = (json_t *) wire;
+ au->wire = json_incref ((json_t *) wire);
au->execution_time = GNUNET_TIME_absolute_get ();
(void) GNUNET_TIME_round_abs (&au->execution_time);
TALER_JSON_hash (au->wire,
&au->h_wire);
- json_incref (au->wire);
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
&au->wtid,
sizeof (au->wtid));
@@ -774,8 +773,8 @@ run_aggregation (void *cls)
GNUNET_free_non_null (au->additional_rows);
if (NULL != au->wire)
json_decref (au->wire);
- au = NULL;
GNUNET_free (au);
+ au = NULL;
/* start again */
task = GNUNET_SCHEDULER_add_now (&run_aggregation,
NULL);
@@ -810,7 +809,10 @@ prepare_cb (void *cls,
struct TALER_EXCHANGEDB_Session *session = au->session;
if (NULL != au->wire)
+ {
json_decref (au->wire);
+ au->wire = NULL;
+ }
GNUNET_free_non_null (au->additional_rows);
if (NULL == buf)
{