]> git.sur5r.net Git - i3/i3/commitdiff
tree_append_json: fix memory leaks
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 9 Jan 2016 13:17:47 +0000 (14:17 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 9 Jan 2016 16:06:58 +0000 (17:06 +0100)
src/load_layout.c

index 9856d07851be72c8c0779f9cc99b3efb73cdcb4c..33435236117ef832a830a7bbbace07c1548cdd56 100644 (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);
 }