[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: fix leak
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: fix leak |
Date: |
Fri, 02 Apr 2021 14:55:17 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new cb686975 fix leak
cb686975 is described below
commit cb686975edec9812f3cc8fb208e61bd5afcf0594
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Apr 2 14:55:15 2021 +0200
fix leak
---
src/json/json.c | 10 ++++++----
src/json/test_json.c | 2 +-
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/json/json.c b/src/json/json.c
index fd526a1d..d0d44058 100644
--- a/src/json/json.c
+++ b/src/json/json.c
@@ -110,7 +110,8 @@ forget (const json_t *in)
json_decref (ret);
return NULL;
}
- if (0 != json_array_append_new (ret, t))
+ if (0 != json_array_append_new (ret,
+ t))
{
GNUNET_break (0);
json_decref (ret);
@@ -145,8 +146,7 @@ forget (const json_t *in)
json_t *t;
json_t *salt;
- if (0 == strcmp (key,
- "_forgettable"))
+ if (fg == value)
continue; /* skip! */
if (rx == value)
continue; /* skip! */
@@ -187,6 +187,7 @@ forget (const json_t *in)
GNUNET_break (0);
json_decref (ret);
json_decref (rx);
+ json_decref (t);
return NULL;
}
if (GNUNET_OK !=
@@ -197,15 +198,16 @@ forget (const json_t *in)
GNUNET_break (0);
json_decref (ret);
json_decref (rx);
+ json_decref (t);
return NULL;
}
+ json_decref (t);
if (NULL == rx)
rx = json_object ();
if (NULL == rx)
{
GNUNET_break (0);
json_decref (ret);
- json_decref (rx);
return NULL;
}
if (0 !=
diff --git a/src/json/test_json.c b/src/json/test_json.c
index 83509f8f..066ba4e7 100644
--- a/src/json/test_json.c
+++ b/src/json/test_json.c
@@ -87,7 +87,7 @@ path_cb (void *cls,
static int
-test_contract ()
+test_contract (void)
{
struct GNUNET_HashCode h1;
struct GNUNET_HashCode h2;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: fix leak,
gnunet <=