ifstat: Fix memleak in dump_kern_db() for json output
Looks like this was forgotten when converting to common json output
formatter.
Fixes: fcc16c2287 ("provide common json output formatter")
Signed-off-by: Phil Sutter <phil@nwl.cc>
This commit is contained in:
parent
35f6adefb8
commit
b530cef0e3
|
|
@ -535,8 +535,12 @@ static void dump_kern_db(FILE *fp)
|
||||||
else
|
else
|
||||||
print_one_if(fp, n, n->val);
|
print_one_if(fp, n, n->val);
|
||||||
}
|
}
|
||||||
if (json_output)
|
if (jw) {
|
||||||
fprintf(fp, "\n} }\n");
|
jsonw_end_object(jw);
|
||||||
|
|
||||||
|
jsonw_end_object(jw);
|
||||||
|
jsonw_destroy(&jw);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dump_incr_db(FILE *fp)
|
static void dump_incr_db(FILE *fp)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue