diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-04-02 14:55:15 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-04-02 14:55:15 +0200 |
commit | cb686975edec9812f3cc8fb208e61bd5afcf0594 (patch) | |
tree | 2a86cfa08bd931e9ce7fc0f044eaa37a7616ecbe /src/json/json.c | |
parent | 25fd6dc25ada684cb52fb680d25d7810d85893fa (diff) |
fix leak
Diffstat (limited to 'src/json/json.c')
-rw-r--r-- | src/json/json.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/json/json.c b/src/json/json.c index fd526a1db..d0d44058d 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 != |