Depending on the memory layout, it could happen that bind->command was
exchanged with something else while the parser still accessed it.
Therefore, we now copy the command and let the parser use that copy.
}
}
- struct CommandResult *command_output = parse_command(bind->command);
+ char *command_copy = sstrdup(bind->command);
+ struct CommandResult *command_output = parse_command(command_copy);
+ free(command_copy);
if (command_output->needs_tree_render)
tree_render();