diff options
author | emanuele-f <black.silver@hotmail.it> | 2019-08-29 15:08:42 +0200 |
---|---|---|
committer | emanuele-f <black.silver@hotmail.it> | 2019-08-29 15:25:52 +0200 |
commit | e98eb294c77f9cdf821c6562a4e629f0bcd5ae45 (patch) | |
tree | 770d5a1dbc1176804b56458f7ba7e4e83eff19ab /example/ndpiReader.c | |
parent | b1270fc7bbef8ac59ccc267891807d4d1b1dba74 (diff) |
Add missing json cleanup
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r-- | example/ndpiReader.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index f679d9a46..625701a70 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1839,6 +1839,17 @@ static void json_init() { /* *********************************************** */ +/** + * @brief JSON destroy function + */ +static void json_destroy() { + json_object_put(jArray_known_flows); + json_object_put(jArray_unknown_flows); + json_object_put(jArray_topStats); +} + +/* *********************************************** */ + static void json_open_stats_file() { if((file_first_time && ((stats_fp = fopen(_statsFilePath,"w")) == NULL)) || @@ -3251,6 +3262,8 @@ void test_lib() { terminateDetection(thread_id); } + + json_destroy(); } /* *********************************************** */ |