]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/src/config.c
ipc: rename COMMAND to RUN_COMMAND for consistency (#2956)
[i3/i3] / i3bar / src / config.c
index 5c23bc78647775b4bb532dfcb966054ed1279555..cbe84d5073e55b714a2d564fd4d666fdfb872e1a 100644 (file)
@@ -7,6 +7,8 @@
  * config.c: Parses the configuration (received from i3).
  *
  */
+#include "common.h"
+
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -17,8 +19,6 @@
 
 #include <X11/Xlib.h>
 
-#include "common.h"
-
 static char *cur_key;
 static bool parsing_bindings;
 static bool parsing_tray_outputs;
@@ -185,6 +185,7 @@ static int config_string_cb(void *params_, const unsigned char *val, size_t _len
 
     if (!strcmp(cur_key, "status_command")) {
         DLOG("command = %.*s\n", len, val);
+        FREE(config.command);
         sasprintf(&config.command, "%.*s", len, val);
         return 1;
     }