int opt;
int option_index = 0;
char *socket_path = getenv("I3SOCK");
+ if (socket_path != NULL) {
+ socket_path = sstrdup(socket_path);
+ }
char *i3_default_sock_path = "/tmp/i3-ipc.sock";
/* Initialize the standard config to use 0 as default */
if (socket_path == NULL) {
socket_path = atom_sock_path;
+ } else {
+ free(atom_sock_path);
}
if (socket_path == NULL) {
/* Request the bar configuration. When it arrives, we fill the config array. */
i3_send_msg(I3_IPC_MESSAGE_TYPE_GET_BAR_CONFIG, config.bar_id);
}
+ free(socket_path);
/* We listen to SIGTERM/QUIT/INT and try to exit cleanly, by stopping the main loop.
* We only need those watchers on the stack, so putting them on the stack saves us