Skip to content

Commit e890126

Browse files
author
Felipe Zimmerle
committed
highlight: Fix JSON structure
1 parent 8c2edc6 commit e890126

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/modsecurity.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,8 @@ int ModSecurity::processContentOffset(const char *content, size_t len,
406406

407407

408408
yajl_gen_map_close(g);
409-
yajl_gen_array_close(g);
410-
411409
yajl_gen_map_close(g);
410+
412411
yajl_gen_array_close(g);
413412
yajl_gen_map_close(g);
414413

@@ -417,6 +416,7 @@ int ModSecurity::processContentOffset(const char *content, size_t len,
417416
json->assign(reinterpret_cast<const char*>(buf), jsonSize);
418417
json->append("\n");
419418

419+
yajl_gen_clear(g);
420420
yajl_gen_free(g);
421421
#else
422422
*err = strdup("Without YAJL support, we cannot generate JSON.");

0 commit comments

Comments
 (0)