]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Use strdup() for the initial value of socket_path (Thanks mseed)
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 22 Jan 2011 16:00:27 +0000 (17:00 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 22 Jan 2011 16:00:27 +0000 (17:00 +0100)
i3-msg/main.c

index 6a51ff557b7254f5c281f9e0b5f85102c5b164cb..c6862fae0d57646e52056a4badbddcae752a66fe 100644 (file)
@@ -109,7 +109,7 @@ static void ipc_recv_message(int sockfd, uint32_t message_type,
 int main(int argc, char *argv[]) {
         char *socket_path;
         if ((socket_path = getenv("I3SOCK")) == NULL) {
-            socket_path = "/tmp/i3-ipc.sock";
+            socket_path = strdup("/tmp/i3-ipc.sock");
         }
         int o, option_index = 0;
         int message_type = I3_IPC_MESSAGE_TYPE_COMMAND;