Bugfix: Use strdup() for the initial value of socket_path (Thanks mseed)
This commit is contained in:
parent
d9bfd8843f
commit
d9dd245bcc
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue