commit 4f202bd4812e86a5ddc2559db1f7166fcc61586d
parent c39475097bcd8382cb04ad80115167c65a613d54
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date: Wed, 1 Mar 2017 22:14:23 +0100
json_copy() data returned from DB. Data gets "freed"
by DB routine and is not longer available without json_copy-ing
it.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_history.c b/src/backend/taler-merchant-httpd_history.c
@@ -64,9 +64,10 @@ pd_cb (void *cls,
json_t *amount;
json_t *timestamp;
json_t *instance;
+ json_t *proposal_data_copy;
-
- GNUNET_assert (-1 != json_unpack (proposal_data,
+ proposal_data_copy = json_copy (proposal_data);
+ GNUNET_assert (-1 != json_unpack (proposal_data_copy,
"{s:o, s:o, s:{s:o}}",
"amount", &amount,
"timestamp", ×tamp,