commit 161b72e0e249f020935f8276cac2a04442ed010e parent 911c1ffafc045dae1549b2d1be9e5fd69bfd0db0 Author: Christian Grothoff <christian@grothoff.org> Date: Tue, 30 Jun 2026 23:04:39 +0200 fix leak Diffstat:
| M | src/lib/exchange_api_common.c | | | 11 | +++++++++++ |
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c @@ -490,6 +490,17 @@ parse_restrictions (const json_t *jresta, } return GNUNET_OK; fail: + for (unsigned int i = 0; i<*resta_len; i++) + { + struct TALER_EXCHANGE_AccountRestriction *ar = &(*resta)[i]; + + if (TALER_EXCHANGE_AR_REGEX == ar->type) + { + GNUNET_free (ar->details.regex.posix_egrep); + GNUNET_free (ar->details.regex.human_hint); + json_decref (ar->details.regex.human_hint_i18n); + } + } GNUNET_free (*resta); *resta_len = 0; return GNUNET_SYSERR;