From 6338a9edbb1d29f4e707a4656b989b809a3d6ebe Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 7 Oct 2020 00:03:08 +0200 Subject: [PATCH] fix json memory leaks --- client/src/emv/emvjson.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/src/emv/emvjson.c b/client/src/emv/emvjson.c index 43f5095e2..0931fb2e8 100644 --- a/client/src/emv/emvjson.c +++ b/client/src/emv/emvjson.c @@ -9,9 +9,7 @@ //----------------------------------------------------------------------------- #include "emvjson.h" - #include - #include "commonutil.h" // ARRAYLEN #include "ui.h" #include "util.h" @@ -75,7 +73,7 @@ int JsonSaveJsonObject(json_t *root, const char *path, json_t *value) { return 1; if (path[0] == '$') { - if (json_path_set(root, path, value, 0, &error)) { + if (json_path_set_new(root, path, value, 0, &error)) { PrintAndLogEx(ERR, "ERROR: can't set json path: %s", error.text); return 2; } else {