mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-13 03:29:51 +08:00
fix json memory leaks
This commit is contained in:
parent
634270f172
commit
6338a9edbb
1 changed files with 1 additions and 3 deletions
|
@ -9,9 +9,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "emvjson.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#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 {
|
||||
|
|
Loading…
Reference in a new issue