From: Michael Stapelberg Date: Sat, 22 Jan 2011 16:00:27 +0000 (+0100) Subject: Bugfix: Use strdup() for the initial value of socket_path (Thanks mseed) X-Git-Tag: tree-pr2~108 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d9dd245bcc420f2e0d151fe5f1ee659463222221;p=i3%2Fi3 Bugfix: Use strdup() for the initial value of socket_path (Thanks mseed) --- diff --git a/i3-msg/main.c b/i3-msg/main.c index 6a51ff55..c6862fae 100644 --- a/i3-msg/main.c +++ b/i3-msg/main.c @@ -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;