=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty-term.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- src/usr.bin/tmux/tty-term.c 2009/08/03 14:10:54 1.5 +++ src/usr.bin/tmux/tty-term.c 2009/08/03 15:30:16 1.6 @@ -1,4 +1,4 @@ -/* $OpenBSD: tty-term.c,v 1.5 2009/08/03 14:10:54 nicm Exp $ */ +/* $OpenBSD: tty-term.c,v 1.6 2009/08/03 15:30:16 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -196,7 +196,8 @@ case TTYCODE_NONE: break; case TTYCODE_STRING: - xfree(code->value.string); + if (code->type == TTYCODE_STRING) + xfree(code->value.string); code->value.string = xstrdup(val); code->type = ent->type; break;