DLOG("execute command %s\n", current->dest.command);
char *full_command;
asprintf(&full_command, "[id=\"%d\"] %s", window->id, current->dest.command);
- parse_cmd(full_command);
+ char *json_result = parse_cmd(full_command);
+ FREE(full_command);
+ FREE(json_result);
}
/* Store that we ran this assignment to not execute it again */
config_path = resolve_tilde("~/.i3/config");
if (path_exists(config_path))
return config_path;
+ free(config_path);
/* 2: check for $XDG_CONFIG_HOME/i3/config */
if ((xdg_config_home = getenv("XDG_CONFIG_HOME")) == NULL)
char *command = scalloc(message_size + 1);
strncpy(command, (const char*)message, message_size);
LOG("IPC: received: *%s*\n", command);
- const char *reply = parse_cmd((const char*)command);
+ char *reply = parse_cmd((const char*)command);
+ char *save_reply = reply;
free(command);
/* If no reply was provided, we just use the default success message */
reply = "{\"success\":true}";
ipc_send_message(fd, (const unsigned char*)reply,
I3_IPC_REPLY_TYPE_COMMAND, strlen(reply));
+
+ FREE(save_reply);
}
static void dump_rect(yajl_gen gen, const char *name, Rect r) {