diff --git a/i3bar/src/main.c b/i3bar/src/main.c index 3b5d7546..14e42a2b 100644 --- a/i3bar/src/main.c +++ b/i3bar/src/main.c @@ -93,6 +93,9 @@ int main(int argc, char **argv) { 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 */