diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-07-30 20:41:48 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-07-30 20:41:48 +0000 |
commit | 97f105cde22c50ecf3cc1edd68df2664f3645bcc (patch) | |
tree | 4897ca1fb5e0a2ad05e037084e8ea04491eb5daf | |
parent | 61f3fc7e4dc5bdf543940f8cc7334f5f64d4b9fb (diff) | |
download | rtmux-97f105cde22c50ecf3cc1edd68df2664f3645bcc.tar.gz rtmux-97f105cde22c50ecf3cc1edd68df2664f3645bcc.tar.bz2 rtmux-97f105cde22c50ecf3cc1edd68df2664f3645bcc.zip |
Plug some memory leaks.
-rw-r--r-- | mode-key.c | 1 | ||||
-rw-r--r-- | screen-write.c | 1 | ||||
-rw-r--r-- | screen.c | 2 | ||||
-rw-r--r-- | status.c | 1 |
4 files changed, 5 insertions, 0 deletions
@@ -337,6 +337,7 @@ mode_key_free_trees(void) while (!SPLAY_EMPTY(mtab->tree)) { mbind = SPLAY_ROOT(mtab->tree); SPLAY_REMOVE(mode_key_tree, mtab->tree, mbind); + xfree(mbind); } } } diff --git a/screen-write.c b/screen-write.c index 449c3a35..d9b523c4 100644 --- a/screen-write.c +++ b/screen-write.c @@ -91,6 +91,7 @@ screen_write_strlen(int utf8flag, const char *fmt, ...) } } + xfree(msg); return (size); } @@ -63,6 +63,8 @@ screen_reinit(struct screen *s) void screen_free(struct screen *s) { + if (s->tabs != NULL) + xfree(s->tabs); xfree(s->title); grid_destroy(s->grid); } @@ -801,6 +801,7 @@ status_prompt_key(struct client *c, int key) memcpy(first, s, strlen(s)); c->prompt_index = (first - c->prompt_buffer) + strlen(s); + xfree(s); c->flags |= CLIENT_STATUS; break; |