Bugfix: Use strdup() for the initial value of socket_path (Thanks mseed)

This commit is contained in:
Michael Stapelberg 2011-01-22 17:00:27 +01:00
parent d9bfd8843f
commit d9dd245bcc

View 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;