=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/arguments.c,v retrieving revision 1.60 retrieving revision 1.61 diff -c -r1.60 -r1.61 *** src/usr.bin/tmux/arguments.c 2023/06/30 21:55:08 1.60 --- src/usr.bin/tmux/arguments.c 2023/11/14 15:59:49 1.61 *************** *** 1,4 **** ! /* $OpenBSD: arguments.c,v 1.60 2023/06/30 21:55:08 nicm Exp $ */ /* * Copyright (c) 2010 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: arguments.c,v 1.61 2023/11/14 15:59:49 nicm Exp $ */ /* * Copyright (c) 2010 Nicholas Marriott *************** *** 761,766 **** --- 761,767 ---- struct args_value *value; struct args_command_state *state; const char *cmd; + const char *file; state = xcalloc(1, sizeof *state); *************** *** 787,793 **** if (wait) state->pi.item = item; ! cmd_get_source(self, &state->pi.file, &state->pi.line); state->pi.c = tc; if (state->pi.c != NULL) state->pi.c->references++; --- 788,795 ---- if (wait) state->pi.item = item; ! cmd_get_source(self, &file, &state->pi.line); ! state->pi.file = xstrdup(file); state->pi.c = tc; if (state->pi.c != NULL) state->pi.c->references++; *************** *** 842,847 **** --- 844,850 ---- cmd_list_free(state->cmdlist); if (state->pi.c != NULL) server_client_unref(state->pi.c); + free((void *)state->pi.file); free(state->cmd); free(state); }