aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-07-30 21:14:04 +0000
committerTiago Cunha <tcunha@gmx.com>2009-07-30 21:14:04 +0000
commit09c64328549676f22a5a541e27a5ad89200e94ad (patch)
treee04a8d4eb79f630d02f88765f5c21a1f29a56189
parent796bfbd7afa40ef5bbc486c6a4bdb857e8204a29 (diff)
downloadrtmux-09c64328549676f22a5a541e27a5ad89200e94ad.tar.gz
rtmux-09c64328549676f22a5a541e27a5ad89200e94ad.tar.bz2
rtmux-09c64328549676f22a5a541e27a5ad89200e94ad.zip
Sync OpenBSD patchset 207:
Plug some memory leaks.
-rw-r--r--mode-key.c3
-rw-r--r--screen-write.c3
-rw-r--r--screen.c4
-rw-r--r--status.c3
4 files changed, 9 insertions, 4 deletions
diff --git a/mode-key.c b/mode-key.c
index 4be32fbd..6024bd68 100644
--- a/mode-key.c
+++ b/mode-key.c
@@ -1,4 +1,4 @@
-/* $Id: mode-key.c,v 1.22 2009-07-28 23:19:06 tcunha Exp $ */
+/* $Id: mode-key.c,v 1.23 2009-07-30 21:14:04 tcunha Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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 94b5d61f..8754610d 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -1,4 +1,4 @@
-/* $Id: screen-write.c,v 1.65 2009-07-28 22:41:38 tcunha Exp $ */
+/* $Id: screen-write.c,v 1.66 2009-07-30 21:14:04 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -91,6 +91,7 @@ screen_write_strlen(int utf8flag, const char *fmt, ...)
}
}
+ xfree(msg);
return (size);
}
diff --git a/screen.c b/screen.c
index 092858f8..77e916cb 100644
--- a/screen.c
+++ b/screen.c
@@ -1,4 +1,4 @@
-/* $Id: screen.c,v 1.94 2009-07-18 11:06:35 nicm Exp $ */
+/* $Id: screen.c,v 1.95 2009-07-30 21:14:04 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -62,6 +62,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);
}
diff --git a/status.c b/status.c
index 3547e593..eb26dd17 100644
--- a/status.c
+++ b/status.c
@@ -1,4 +1,4 @@
-/* $Id: status.c,v 1.106 2009-07-28 23:11:18 tcunha Exp $ */
+/* $Id: status.c,v 1.107 2009-07-30 21:14:04 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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;