tree_append_json: fix memory leaks

This commit is contained in:
Michael Stapelberg 2016-01-09 14:17:47 +01:00
parent f904511b7e
commit 414be6290d
1 changed files with 3 additions and 0 deletions

View File

@ -640,8 +640,11 @@ void tree_append_json(Con *con, const char *filename, char **errormsg) {
setlocale(LC_NUMERIC, "");
yajl_complete_parse(hand);
yajl_free(hand);
yajl_gen_free(g);
fclose(f);
free(buf);
if (to_focus)
con_focus(to_focus);
}