diff options
author | neodarz <neodarz@neodarz.net> | 2019-08-09 11:46:05 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2019-08-09 11:46:05 +0200 |
commit | a6408962010c1880a54d2f0f3a1e35b0ca65531d (patch) | |
tree | 01d3da1b8d6b9f5fa2987f8594f55490d5c769d4 /db | |
parent | dbb8f177d5bc28bb2a51be4d3b9344e08fd869f6 (diff) | |
download | umosapicpp-a6408962010c1880a54d2f0f3a1e35b0ca65531d.tar.xz umosapicpp-a6408962010c1880a54d2f0f3a1e35b0ca65531d.zip |
Fix memory leak
Diffstat (limited to 'db')
-rw-r--r-- | db/uobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/db/uobject.cpp b/db/uobject.cpp index ce685b3..0b76daf 100644 --- a/db/uobject.cpp +++ b/db/uobject.cpp @@ -68,7 +68,7 @@ std::string uobject::add(std::string collection, struct json_object* jsonObject, std::cout << typeid(json_datas).name() << std::endl; std::cout << "json_datas type: " << json_type_to_name(json_object_get_type(json_datas)) << std::endl; } - json_tokener_reset(tok); + json_tokener_free(tok); return json_object_to_json_string_ext(jsonObject, JSON_C_TO_STRING_SPACED | JSON_C_TO_STRING_PRETTY); } |