highlight: Fix JSON structure

This commit is contained in:
Felipe Zimmerle 2018-10-11 10:01:28 -03:00
parent 7fb937eabe
commit 2d87fc5184
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -417,9 +417,8 @@ int ModSecurity::processContentOffset(const char *content, size_t len,
yajl_gen_map_close(g); yajl_gen_map_close(g);
yajl_gen_array_close(g);
yajl_gen_map_close(g); yajl_gen_map_close(g);
yajl_gen_array_close(g); yajl_gen_array_close(g);
yajl_gen_map_close(g); yajl_gen_map_close(g);
@ -428,6 +427,7 @@ int ModSecurity::processContentOffset(const char *content, size_t len,
json->assign(reinterpret_cast<const char*>(buf), jsonSize); json->assign(reinterpret_cast<const char*>(buf), jsonSize);
json->append("\n"); json->append("\n");
yajl_gen_clear(g);
yajl_gen_free(g); yajl_gen_free(g);
#else #else
*err = strdup("Without YAJL support, we cannot generate JSON."); *err = strdup("Without YAJL support, we cannot generate JSON.");