mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 21:56:57 +00:00
Actually incrementing the reference count would be nice.
This commit is contained in:
6
tty.c
6
tty.c
@ -1,4 +1,4 @@
|
||||
/* $Id: tty.c,v 1.15 2007-12-06 21:57:57 nicm Exp $ */
|
||||
/* $Id: tty.c,v 1.16 2007-12-10 07:58:00 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -167,8 +167,10 @@ tty_find_term(char *name, int fd, char **cause)
|
||||
int error;
|
||||
|
||||
TAILQ_FOREACH(term, &tty_terms, entry) {
|
||||
if (strcmp(term->name, name) == 0)
|
||||
if (strcmp(term->name, name) == 0) {
|
||||
term->references++;
|
||||
return (term);
|
||||
}
|
||||
}
|
||||
|
||||
term = xmalloc(sizeof *term);
|
||||
|
Reference in New Issue
Block a user