mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 18:38:48 +00:00
Plug some memory leaks.
This commit is contained in:
parent
61f3fc7e4d
commit
97f105cde2
@ -337,6 +337,7 @@ mode_key_free_trees(void)
|
|||||||
while (!SPLAY_EMPTY(mtab->tree)) {
|
while (!SPLAY_EMPTY(mtab->tree)) {
|
||||||
mbind = SPLAY_ROOT(mtab->tree);
|
mbind = SPLAY_ROOT(mtab->tree);
|
||||||
SPLAY_REMOVE(mode_key_tree, mtab->tree, mbind);
|
SPLAY_REMOVE(mode_key_tree, mtab->tree, mbind);
|
||||||
|
xfree(mbind);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,7 @@ screen_write_strlen(int utf8flag, const char *fmt, ...)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xfree(msg);
|
||||||
return (size);
|
return (size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
screen.c
2
screen.c
@ -63,6 +63,8 @@ screen_reinit(struct screen *s)
|
|||||||
void
|
void
|
||||||
screen_free(struct screen *s)
|
screen_free(struct screen *s)
|
||||||
{
|
{
|
||||||
|
if (s->tabs != NULL)
|
||||||
|
xfree(s->tabs);
|
||||||
xfree(s->title);
|
xfree(s->title);
|
||||||
grid_destroy(s->grid);
|
grid_destroy(s->grid);
|
||||||
}
|
}
|
||||||
|
1
status.c
1
status.c
@ -801,6 +801,7 @@ status_prompt_key(struct client *c, int key)
|
|||||||
memcpy(first, s, strlen(s));
|
memcpy(first, s, strlen(s));
|
||||||
|
|
||||||
c->prompt_index = (first - c->prompt_buffer) + strlen(s);
|
c->prompt_index = (first - c->prompt_buffer) + strlen(s);
|
||||||
|
xfree(s);
|
||||||
|
|
||||||
c->flags |= CLIENT_STATUS;
|
c->flags |= CLIENT_STATUS;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user