diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2011-08-20 20:37:30 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2011-08-20 20:37:30 +0000 |
commit | 3657aa675e47eafcfa1e1186c3f4c51c4e5b6a7e (patch) | |
tree | 66b48be13454aa8a8d9b4b051756193c3bb0393b | |
parent | 88e9079870a770c39dd8f96302602a792db9a90a (diff) | |
download | rtmux-3657aa675e47eafcfa1e1186c3f4c51c4e5b6a7e.tar.gz rtmux-3657aa675e47eafcfa1e1186c3f4c51c4e5b6a7e.tar.bz2 rtmux-3657aa675e47eafcfa1e1186c3f4c51c4e5b6a7e.zip |
Fix a couple of memory leaks, from marcel partap.
-rw-r--r-- | server-client.c | 2 | ||||
-rw-r--r-- | status.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/server-client.c b/server-client.c index 9dfcac02..cf2a4c54 100644 --- a/server-client.c +++ b/server-client.c @@ -171,6 +171,8 @@ server_client_lost(struct client *c) if (c->cwd != NULL) xfree(c->cwd); + environ_free(&c->environ); + close(c->ibuf.fd); imsg_clear(&c->ibuf); event_del(&c->event); @@ -551,8 +551,10 @@ status_find_job(struct client *c, char **iptr) /* First try in the new tree. */ so_find.cmd = cmd; so = RB_FIND(status_out_tree, &c->status_new, &so_find); - if (so != NULL && so->out != NULL) + if (so != NULL && so->out != NULL) { + xfree(cmd); return (so->out); + } /* If not found at all, start the job and add to the tree. */ if (so == NULL) { |