diff options
Diffstat (limited to 'usr.bin/tmux/tty-term.c')
-rw-r--r-- | usr.bin/tmux/tty-term.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/usr.bin/tmux/tty-term.c b/usr.bin/tmux/tty-term.c index 3bd0e3a6ec8..1c86709f95d 100644 --- a/usr.bin/tmux/tty-term.c +++ b/usr.bin/tmux/tty-term.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty-term.c,v 1.28 2012/05/22 09:36:12 nicm Exp $ */ +/* $OpenBSD: tty-term.c,v 1.29 2012/07/10 11:53:01 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -252,7 +252,7 @@ tty_term_override(struct tty_term *term, const char *overrides) *ptr++ = '\0'; val = xstrdup(ptr); if (strunvis(val, ptr) == -1) { - xfree(val); + free(val); val = xstrdup(ptr); } } else if (entstr[strlen(entstr) - 1] == '@') { @@ -278,7 +278,7 @@ tty_term_override(struct tty_term *term, const char *overrides) break; case TTYCODE_STRING: if (code->type == TTYCODE_STRING) - xfree(code->value.string); + free(code->value.string); code->value.string = xstrdup(val); code->type = ent->type; break; @@ -296,12 +296,11 @@ tty_term_override(struct tty_term *term, const char *overrides) } } - if (val != NULL) - xfree(val); + free(val); } } - xfree(s); + free(s); } struct tty_term * @@ -463,10 +462,10 @@ tty_term_free(struct tty_term *term) for (i = 0; i < NTTYCODE; i++) { if (term->codes[i].type == TTYCODE_STRING) - xfree(term->codes[i].value.string); + free(term->codes[i].value.string); } - xfree(term->name); - xfree(term); + free(term->name); + free(term); } int |