]> git.sur5r.net Git - i3/i3/blobdiff - src/load_layout.c
Ensure that the "border" command uses logical pixels.
[i3/i3] / src / load_layout.c
index d9acd1ba0f89acbf326fbdcb2250f9e30c39eccb..173e573b775f0cb9090a712f125d0ac4b9f3826b 100644 (file)
@@ -87,6 +87,7 @@ static int json_end_map(void *ctx) {
                 Match *match = TAILQ_FIRST(&(json_node->swallow_head));
                 TAILQ_REMOVE(&(json_node->swallow_head), match, matches);
                 match_free(match);
+                free(match);
             }
         }
 
@@ -264,6 +265,9 @@ static int json_string(void *ctx, const unsigned char *val, size_t len) {
         if (strcasecmp(last_key, "name") == 0) {
             json_node->name = scalloc(len + 1, 1);
             memcpy(json_node->name, val, len);
+        } else if (strcasecmp(last_key, "title_format") == 0) {
+            json_node->title_format = scalloc(len + 1, 1);
+            memcpy(json_node->title_format, val, len);
         } else if (strcasecmp(last_key, "sticky_group") == 0) {
             json_node->sticky_group = scalloc(len + 1, 1);
             memcpy(json_node->sticky_group, val, len);
@@ -637,8 +641,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);
 }