gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-merchant] branch master updated: json_copy() data re


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: json_copy() data returned from DB. Data gets "freed" by DB routine and is not longer available without json_copy-ing it.
Date: Wed, 01 Mar 2017 22:15:58 +0100

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 4f202bd  json_copy() data returned from DB.  Data gets "freed" by DB 
routine and is not longer available without json_copy-ing it.
4f202bd is described below

commit 4f202bd4812e86a5ddc2559db1f7166fcc61586d
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Mar 1 22:14:23 2017 +0100

    json_copy() data returned from DB.  Data gets "freed"
    by DB routine and is not longer available without json_copy-ing
    it.
---
 src/backend/taler-merchant-httpd_history.c | 5 +++--
 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
index 25e3b03..da742f1 100644
--- 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", &timestamp,

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]